Optimizing publish/subscribe matching for non-wildcarded topics
First Claim
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.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, a system and a computer program product for matching a publication to at least one subscriber are disclosed. After receiving a publication request, a matching engine accesses a hash table to determine whether there is a non-wildcarded match corresponding to the publication request. If the matching engine finds the non-wildcarded match in the hash table, the matching engine omits validating a topic of the publication and provides the non-wildcarded match to the broker device without waiting for a result of searching a wildcarded match. Otherwise, the matching engine validates the topic of the publication. The matching engine also starts to search a wildcarded match in a wildcarded subscription data store. Upon finding the wildcarded match, the matching engine provides the wildcarded match to the broker device. The matching engine provides each result of the findings asynchronously to the broker device.
-
Citations
12 Claims
-
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 Dependent Claims (2, 3, 4, 5, 11, 12)
-
-
6. A computer-implemented system 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 system comprising:
-
a broker device, implemented by a computing system including at least one processor and at least one memory device coupled to the at least one processor, wherein the broker device is configured to; receive the publication from a publisher, the publication having a first topic;
simultaneously search 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 the 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;determine, from the mapping 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; validate the first topic of the publication, in response to determining that there is no non-wildcarded match at the non-wildcard subscription data store, the spawned threads sharing results of the validating with each other;
oromit the validation of 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; determine whether the topic of the publication is incorrect and how the first topic can be amended to avoid the incorrectness; contact the publisher to inform that the first topic is incorrect and to inform how the first topic can be amended to avoid the incorrectness in response to determining that the first topic of the publication is incorrect; determine whether the first topic of the publication is incorrect and how the first topic can be amended to avoid the incorrectness; inform the publisher about the incorrectness and how the first topic can be amended;
upon being informed, re-publish, by the publisher, the publication with a new topic;receive the non-wildcarded match of the first topic, when existing, or the wildcarded match of the first topic asynchronously, 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 send the received or re-published publication to the first and second subscribers. - View Dependent Claims (7, 8, 9, 10)
-
Specification