Hi Stephs On 7/7/06, stephans <[EMAIL PROTECTED]> wrote:
Hi folks, i am currently writing my master thesis on improving filter performance in publish/subscribe environments.
Interesting! :)
Can anyone of you outline how filtering is done in activemq, i.e. if you are using the counting algorithm or more advanced approaches like building a matching tree from subscriptions like mentioned in the paper by aguilera/strom or something like that? I would appreciate any answers from you.
The code for the filtering is all here BTW... http://incubator.apache.org/activemq/maven/activemq-core/xref/org/apache/activemq/filter/package-summary.html for topic wildcards like A.B.C or A.B.* or A.> and so forth we use a DestinationMap which is a matching tree of the path names... http://incubator.apache.org/activemq/maven/activemq-core/xref/org/apache/activemq/filter/DestinationMap.html but for selectors (arbitrary SQL 92 predicates on the message which the variables usually refer to headers) are implemented typically by just evaluating a usual predicate tree, per consumer right now. The only tricky area is that often consumers pull messages when they have spare buffers; so an optimised filter engine with some kind of predicate tree would have to work in a pull rather than push mode maybe. e.g. we could evaluate all the filters when a message comes in & remember which consumer match. Or what we do right now is only evaluate a filter when there is a consumer who is attempting to fill its buffer of available messages. So maybe something in between the two? -- James ------- http://radio.weblogs.com/0112098/
