users@grizzly.java.net

[Q] selectorHandler, protocolChain and Out of Order messages

From: Simon Trudeau <strudeau_at_bluetreewireless.com>
Date: Wed, 5 Mar 2008 09:25:30 -0500

Assuming I am developing a client application who makes many concurrent
client connections to different servers. My client side implementation
makes use of one selectorHandler with its protocolChain and many
connectorHandlers to establish the concurrent connections with the
different servers.

 

My questions are:

 

How do the protocol filters in the protocolChain make the different
between the different source (servers) when handling byte buffers? When
reaching myBusinessLogicFilter, I need to be able to route the messages
received according to from where they were from.

 

How does the protocolParser deals with out of order messages (when
communicating over UDP for example) or with packets which have been
dropped? How does it (ProtocolParser) deal with messages coming from
many different sources (servers)? Won't there be problems with message
reassembly?

 

Thanks (code snippet would be greatly appreciated),

 

 

 

Simon