Netty multiplexing

krishnagade KRISHNA.GADE at GMAIL.COM
Tue Nov 23 08:41:41 EST 2010


I've a question about netty multiplexing. Basically we're designing a
workflow framework on top of netty where each workflow will have a pipeline
associated with it. We want to call the netty pipeline based on the workflow
specified in the request. 

At this point I create a pipeline factory for each workflow and bind it to a
port. And all the workflow servers are running the same process. And
additionally I have a proxy pipeline in the same process bound to another
port that listens to client requests, decodes the workflow and issues a
request to one of the workflow servers.

In order to accomplish this task I maintain a map of netty workflow clients
for each workflow server instance in the proxy. This map is created whenever
an external client opens a connection to talk to the proxy. 

I mimicked the code that Trustin posted for HexDumpProxy to accomplish this.

But I see a potential performance problem : All my workflow servers and
proxy server are all running in one process. So, ideally I should not be
writing to the socket to communicate from the proxy server's workflow client
to one of the workflow servers. I should just be able to write it in memory
or inovke the workflow pipeline by sending an event. Is this possible ? 

I also tried to run my workflow server factory as DefaultLocalChannelFactory
and my workflow client factory to be DefaultLocalClientChannelFactory. I'm
wondering if communication on a local channel involves writing to the socket
and reading from it or somehow magically happens thru' a memory read/write.

Any advice/help/pointers would be greatly appreciated.
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-multiplexing-tp5766651p5766651.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list