Netty multiplexing

Frederic Bregier fredbregier at free.fr
Wed Nov 24 15:18:47 EST 2010


Hi Krishna,

NetworkTransaction is more an helper than a global state. It stores
information into a map using both local Id and remote Id (both Ids come from
local channel) as unique identider.
You can of course do the samething directly from the network channel
handler.
But you will need a way to associate local channels (multiple) with one
network channel and to be able to write directly from local channels
handlers into this unique network channel. So you will need something close
to a map, whatever global (all network handler) or local to the current
network handler.

Between server/client channel (network channel) and local channel (server
side), it is through memory using the intra channel capability of Netty. It
works great, fast and without big memory usage, but you have to take care of
course of the codec you use such that you don't use too many memory on the
coding/decoding part and to address speed up between local messages and
network messages by preventing any copy (so the reason I use length in front
of messages without decoding the local part, letting the local handler doing
the business work on the data).
So the network message is: length localId remoteId data where data is
another packet for local handler using the internal business packet. You can
think about it like "old" (or not so old) protocols do for encapsulating
(like X25 within TC/IP, or like FCoE on TCP/IP).
The idea is to encapsulate the local business data without touching it but
including it within a network packet (for me adding some information in
front of the data).

Hope this helps...

Frederic

-----
Hardware/Software Architect
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-multiplexing-tp5766651p5771908.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list