×

Optimizing publish/subscribe matching for non-wildcarded topics

  • US 8,250,032 B2
  • Filed: 06/02/2009
  • Issued: 08/21/2012
  • Est. Priority Date: 06/02/2009
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer-implemented method for expediting of matching a publication to at least one subscriber by simultaneously searching two separate data stores, which are a non-wildcarded subscription data store and a wildcarded subscription data store, the method comprising:

  • receiving, at a broker device including a processor, the publication from a publisher, the publication having a first topic;

    simultaneously searching for a non-wildcarded match with said first topic at the non-wildcard subscription data store and a wildcarded match with said first topic at the wildcard subscription data store by spawning separate threads and running the spawn threads in parallel, each spawned thread independently searching each data store, the spawned threads guaranteeing that receiving a result of the searching does not prevent further processing of the non-wildcarded match and the wildcarded match, the spawn threads communicating each other and sharing the search result each other, the non-wildcarded match indicating a first subscriber subscribing to a topic exactly matching with the first topic of the publication, the wildcarded match indicating a second subscriber whose subscription includes a wildcard character and whose subscription encompasses the first topic of the publication, the non-wildcard subscription data store including a hash table, implemented by a direct mapped cache memory device, providing a mapping of topics to one or more subscribers;

    determining, from the mapping of the topics in the hash table, whether there exists a non-wildcarded match of the first topic of the publication at the non-wildcarded subscription data store; and

    validating, by the broker device, the first topic of the publication, in response to determining that no non-wildcarded match exists at the non-wildcard subscription data store, the spawned threads sharing results of the validating with each other;

    omitting the step of validating, by the broker device, the first topic of the publication, upon determining that the non-wildcarded match of the first topic of the publication exists at the non-wildcarded subscription data store;

    determining whether the first topic of the publication is incorrect and how the first topic can be amended to avoid the incorrectness;

    in response to determining that the first topic of the publication is incorrect, informing the publisher about the incorrectness and how the first topic can be amended;

    upon being informed, re-publishing, by the publisher, the publication with a new topic;

    providing the non-wildcarded match of the first topic, when existing, or the wildcarded match of the first topic asynchronously to the broker device, wherein non-wildcarded match is immediately provided to the broker device without waiting until finding the wildcarded match when the non-wildcarded match exists; and

    sending the received or re-published publication from the broker device to the first and second subscribers.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×