[jboss-dev-forums] [Design the new POJO MicroContainer] - Out of order message problem (discussion thread for JBREM-96

david.lloyd@jboss.com do-not-reply at jboss.com
Mon Apr 14 12:12:42 EDT 2008


When dealing with a protocol using multiple channels (HTTP for example, and possibly a future multi-channel JRPP variant), sending two messages on two different channels can cause ordering issues if the second message sent arrives first.

For example, sending a context open on channel A, and a request on channel B, may cause the request to be received before the context open message, resulting in the request being rejected with a "no such context" error. Another example is that stream messages must be handled sequentially.

There are several possible solutions, including but not limited to:

* for any message B that must come after A, always send A and B on the same channel (problem: HTTP channels are transient, so this won't work for HTTP) (problem: this could load up one channel while leaving other channels empty, even if load-balancing is used)
* don't send B until after A is acknowledged (problem: acknowledging A might not be possible within the underlying protocol, like if A is sent in an HTTP reply, requiring a separate ACK message, which can lead to performance problems)
* if a message comes in seemingly unsolicited (like a request on a nonexistant context) or out of sequence (like in a stream), queue the message for some fixed amount of time to see if the context open message arrives (problem: could be a source of DoS on the server; also this is a duplication of what protocols like TCP already do, which means that all the same problems must be in effect re-solved)

Please share any ideas you have or comments on the above.

The JIRA issue is at http://jira.jboss.com/jira/browse/JBREM-963

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

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



More information about the jboss-dev-forums mailing list