Concurrency within ChannelHandlers?

Iain McGinniss iainmcgin at gmail.com
Mon Jul 20 15:33:11 EDT 2009


Currently using NIO, for both client and server. Should it matter all  
that much, other than for tweaking to different usage scenarios  
further down the line?

Iain

On 20 Jul 2009, at 17:56, Michael McGrady wrote:

> Are you using Oio, Nio, Xnio?
>
> Mike
>
> On Jul 20, 2009, at 6:43 AM, Iain McGinniss wrote:
>
>> Hello all,
>>
>> I am currently trying to put together my own HTTP tunnel. So far,  
>> I've
>> been writing the client side. What I want to ensure is that there  
>> will
>> always be at least one request sent to the server end of the tunnel,
>> which it can use to stream responses back to me (with a maximum 16KB
>> payload per request / response). As sending is happening
>> asynchronously to receiving, I don't know what the best approach is  
>> in
>> Netty when it comes to concurrency in the handlers. The send handler
>> may, for instance, choose to halt the transmission of the current
>> request so that it becomes available for the server to send messages
>> back sooner - this can be achieved by sending less chunks for the
>> current request, so that more requests are generated (higher  
>> overhead,
>> but ensures the server is not blocked waiting for another response).
>>
>> So in this kind of situation, where the send behaviour is dependent  
>> on
>> the timing of received messages, how should I orchestrate this? Is
>> there a way to get a handle on the thread pool used for the channel,
>> and schedule tasks for later execution? Or is there some more elegant
>> way of doing things like this in Netty? Ideally, I'd like to avoid
>> creating my own pools, to prevent a situation where the number of
>> threads in use grows with the number of HTTP tunnels.
>>
>> Iain
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>
> Mike McGrady
> Principal Investigator AF081-028 AFRL SBIR
> Senior Engineer
> Topia Technology, Inc
> 1.253.720.3365
> mmcgrady at topiatechnology.com
>
>
>
>
>
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users



More information about the netty-users mailing list