Multiple ChannelPipelines per Channel

McCloud Duncan.Doyle at gmail.com
Mon Oct 12 17:30:12 EDT 2009


Hello,

I'm pretty new to Netty. I'm currently trying to build an HTTP proxy, which
apart from receiving requests from a client and forwarding them to the
proxied server (and vice versa for the response), is able to decode the data
into HttpRequest and HttpResponse messages. These messages will later used
to analyse response time, etc. in a different (remote) component.

I based the initial version on the proxy example supplied by Netty (I
slightly modified the structure). The example provided just dumps the data
in Hex format. Then I noticed the Http examples, which use the
HttpRequestEncoder and Decoder classes. I don't however want to first decode
and then encode the proxied data due to possible performance issues, I want
the proxy to be as fast as possible.

So my idea was to attach 2 ChannelPipelines to the same Channel (for both
the server side and client side channels). One pipeline is responsible for
the proxy functionality, the other pipeline is responsible for decoding the
data into HttpRequests (on the server side channel) and HttpResponses (on
the client side channel) and sending the data to a remote component for
analysis. Both ChannelPipelines will use their own Executor (or Thread).

Is this possible in Netty with the default API, or do I need to extend the
framework in one way or the other.

Regards,

Duncan
-- 
View this message in context: http://n2.nabble.com/Multiple-ChannelPipelines-per-Channel-tp3810809p3810809.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list