One message at a time in each handler?
falconair
shahbazc at gmail.com
Mon May 31 02:17:45 EDT 2010
Does netty's ChannelHandler semantics include a guarantee that only one
message at a time will flow through individual channel handlers?
I didn't read any such thing in the docs, but I understand netty is based on
SEDA architecture, and I understand SEDA includes such guarantee.
In other words, which is more accurate representation of netty:
[h1]->[h2]->[h3]
or
{q1}==>[h1]->{q2}==>[h2]->{q3}==>[h3]
In the first scenario, multiple [h2] handler might be invoked for the SAME
pipeline, which means instance variables are prone to threading issues.
In the second scenario, interleaved queues make sure only one message is
processed by handler (for the same pipeline), therefore instance variables
are safe from dead-locks and race conditions.
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/One-message-at-a-time-in-each-handler-tp5120658p5120658.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list