[Design of JBoss ESB] - Re: Design of a Content Based Routing Service
by mark.little@jboss.com
"ddunkin" wrote : Upgrading to JBossRules 3 will mean rewriting the DSL, which is fine. I haven't looked at how it's done in the new version, but it was dead simple to write a DSL for Drools.
|
This would have to be the latest GA version of JBossRules.
anonymous wrote :
| What do you mean by "plain java implementation?"
|
| Do you want to support a single language for rule matching (e.g. XPath) or leave it open-ended/extensible? I think that will help define whether or not to support Serializable. It would be cool to be able to specify a rule using EL on a POJO graph and XPath on an XML document. I guess it wouldn't really matter as long as the RHS of the rule fulfilled some contract like asserting a Destination to working memory.
|
It would be good to support both. As I've said in another posting, we're letting people add their own Message formats for on-the-wire, so although we can initially say CBR only works if you use our XML format, eventually we'll need to put in place a framework to allow users extensibility at this level too.
anonymous wrote :
| For my needs, if no rule matches the message, the message router returns an error. I could envision others wanting a default route/destination. I'm not very familiar with the action chain, but could that just be another action for those that require that functionality? I.e. an action after the CBR action would check for a defined destination and set a default if none exists. I suppose that would only work if the CBR service returns an action name instead of forwarding the message.
|
Certainly for security and audit-trail purposes I'd agree that "no matching rule == fault" is a good sensible default. Providing flexibility at this level is fine, but needs to be addressed in the context of security: for example, we don't want arbitrary users intercepting messages and routing them to for their own nefarious reasons ;-)
anonymous wrote :
| I don't have an immediate need for sending one message to multiple destinations, but I will in the future. The only tricky part about that I can think of is with synchronous messages. If I send a message and am expecting a reply, who do I accept a reply from? My thought would be for synchronous messages to have one primary destination, from which the reply would come, and secondary destinations, which would be sent the message asynchronously. I haven't followed JBossESB that closely -- is there even the concept of synchronous and asynchronous messages?
I think the first question to ask is: why multiple destinations? The answer to that will impact the rest.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980676#3980676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980676
19 years, 5 months
[Design of JBossCache] - Re: Eviction thread behaviour
by ben.wang@jboss.com
"manik.surtani(a)jboss.com" wrote : 1) Should the eviction thread always use a lock acquisition timeout of 0, simply because if anyone else has a lock on the node being evicted then it should not be evicted? Since this is algorithm-specific, the BaseEvictionPolicy's evict() method should return an appropriate value if the eviction failed because of a timeout (rather than throw an exception, as this may be quite common with a timeout of 0)
I don't think it is necessarily true that if a node has a read/write lock, it should not be evicted. Take for example the eivction policy of FIFO or policy with a node max age. Both will evict the corresponding node even when it just has been accessed.
Unfortunately, I still don't see how eviction timeout will cause deadlock or slow system down though? This can happen if the event queue has been filled up. But Manik has made the queue size configurable now. So theorectically, we should not run into this problem anymore. Therefore, making the timeout of 0 may not be necessarily anymore.
"manik.surtani(a)jboss.com" wrote : 2) BaseEvictionAlgorithm.evictCacheNode(), which calls BaseEvictionPolicy.evict(), would have to decide on whether a failure to evict because of a timeout should result in the eviction call being put back on the queue. In the case of an LRU type policy, this probably should *not* happen since the fact that the node is locked, it should be treated as a nodeVisited event and this eviction call should be removed from the eviction queue.
If we fail to evict the node, it will be put into a special recycle queue to be process again within the next cycle. When the nodeVisited event comes in, it is supposed to remove node event from both queues. If it is not, then it is a bug.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980657#3980657
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980657
19 years, 5 months