Dynamically adding handlers to channel pipelines

imk ilker.tech at gmail.com
Sun Mar 28 05:59:57 EDT 2010


Hi - 

I am trying to see whether or not I should use Netty for implementing a
client/server TCP/IP based protocol in Java. The client/server interactions
are goint to based on arbitrary 'bits' rather than bytes'.

My first question is, is there anyone out there who tried to work at the bit
level rather than bytes? Is there any source code/examples? Best practices?? 

My second, and actual!, question is, I do have the following situation that
I need to handle, and again I need best practices on how to proceed:  

In the protocol, there is so-called an 'Header' comprising X bits. Depending
on the value of particular bits or a single bit of the 'Header', what
follows the ApplicationHeader dynamically changes. Therefore, my pipeline
should (I presume) would need to get hold of X bits first, and then check
specific bits out of that value, and dynamically change the pipeline..Are
there any examples of dynamically changing pipelines??

Also, I need to compute (and actually write to database) *lots* of
statistical data. (i.e. kilobytes received, messages received, etc etc.).
What is the best way of doing this? Program thread objects which have
references to handlers? or else?

Many thanks
Cheers
-- 
View this message in context: http://n2.nabble.com/Dynamically-adding-handlers-to-channel-pipelines-tp4812425p4812425.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list