[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Algorithm broken in WildcardAddressManager

timfox do-not-reply at jboss.com
Tue Jan 6 11:20:28 EST 2009


How about a variation on the caching approach?

The old caching approach that we discounted involved evaluating the routing address against all wildcards once to get the matching list, then caching the list for subsequent lookups.

The problem with the approach was that if a new match was added you had to invalidate the cache, so the next lookup would re-evaluate all matches. If a lot of new queues were being added frequently (as is often the case), then this would cause a lot of re-evaluation and slowness.

We could be a bit cleverer, and not invalidate the entire cache very time a new wildcard queue is added, but just evaluate the new match and add it to the cache.

If a match is removed from the post office then we could just look in the cache for each routing address and remove it from there.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199836#4199836

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199836



More information about the jboss-dev-forums mailing list