Ordered downstream events
ochtar fear
ochtar.fear at gmail.com
Mon Apr 12 08:47:48 EDT 2010
Hi
Thanks for the great framework. It simplifies my life a lot!
But there is one little problem to be solved. In our netty-based server to
interact with clients we use encrypted packets. Our encpypt algorithm is so
that we need packets to be written to socket exactly in the same order they
were encrypted, for them to be decoded correctly on client-side. And our
server is implemented in the way that several packets can be sent from
different parts (thread pools) simultaniously. I implemented PacketEncoder
using OneToOneEncoder and added it to the pipeline along with
LengthPrepender. But there are chances that after one packet in one thread
will have been encrypted and before it will be written to the socket, other
packet will be encrypted and written to socket in other thread. So, the
order will be corrupted.
Every Channel has its own encryptor with its own parameters. So, I suppose I
need something like ExecutionHandler with OrderedMemoryAwareThreadPool
forwarding not upstream but downstream events to ThreadPool. Looking through
the user guide and API reference I can't seem to find anything like this.
The question is: am I missing something? Or do I need to implement this kind
of Handler by myself?
Thanks in advance.
PS: Sorry for my english.
--
View this message in context: http://n2.nabble.com/Ordered-downstream-events-tp4889832p4889832.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list