single channelpipeline vs multiple channelpipelines

anthony_w awwold69 at hotmail.com
Wed May 5 14:28:56 EDT 2010


Hello Netty users.  I just started exploring Netty about 3 weeks ago and like
what I see.  My intention is to use Netty to create a device simulation
environment.  I have a client application that can TCP/IP connect to many
devices on the network via each devices ip/port.  Since I can't
realistically test with 1000 devices, I plan to use a netty server app
running on one machine, to simulate multiple devices.  So here is where I
need some help understanding how and what I should do with Netty.  My two
ideas were as follows (I hope my terminology is correct):


1) Bind to single server port (as seen in all the examples).  Add a handler
to the default channel pipleline.  And the handlers implementation would
determine which "device" the inbound message was intended for and then
process it properly.  Sort of a "routing" within the handler to some
business logic.


2) Bind to 1000 ports.  Each port has it's own channel pipleline and thus
the handler doesn't really need to handle any "routing".  It's basically
been accomplished on the client side by connecting to the correct port that
equates to device X.


So here is where my questions arise.

#1 is doable, but would I be trying to push too much through a single port
when my simulation starts to scale?  (2000 devices, 3000 devices, etc)

#2 are multiple channel pipelines even feasable within Netty?  


So any advice would be helpful regarding my implementation ideas.  I've got
a thick skin so I won't be offended if someone replies back and say "this is
the stupidest thing I've ever heard" :-)

Anthony.
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/single-channelpipeline-vs-multiple-channelpipelines-tp5010378p5010378.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list