When is ExecutionHandler necessary

Frederic Bregier fredbregier at free.fr
Sun Oct 18 03:24:04 EDT 2009


Hi Dan,

Take a look at the documentation and specifically the API.
One advantage of the given ExecutionHandler (specifically
OrderedMemoryAwareThreadPoolExecutor) is that message will be kept in order
for one channel. If you don't have any such need (message can arrived in any
order for any channel), then my believe is that you can use your own
ExecutionHandler.

Cheers,
Frederic


Dan D wrote:
> 
> bump
> 
> On Thu, Oct 15, 2009 at 11:10 AM, Dan D <danotsky at gmail.com> wrote:
> 
>> Below, Trustin mentions using an ExecutionHandler for long-running
>> business
>> logic to prevent tying up Netty's worker threadpool.  If a cached thread
>> pool is being used for the worker threads, is this still a problem? 
>> Won't
>> the threadpool just expand as necessary if business logic is tying up
>> threads?
>>
>> Also is an ExecutionHandler required, or can we just submit work to our
>> own
>> ExecutorService?  If ExecutionHandler isn't required, what are the
>> benefits
>> to using one?
>>
>> Thanks.
>>
>>
>>
>>> On Tue, Sep 29, 2009 at 3:42 AM, Trustin Lee (???) <trustin at gmail.com>
>>> wrote:
>>> > Hi Wade,
>>> >
>>> > If your business logic takes long time, then you should use an
>>> > ExecutionHandler. ?Otherwise, other connections will freeze until the
>>> > long operation finishes. ?If there's no long operation in your
>>> > business logic, you don't usually need an ExecutionHandler in your
>>> > pipeline.
>>> >
>>> > I also suggest to put decoders and encoders before ExecutionHandler
>>> > (if there is one), because decoders and encoders usually do CPU-bound
>>> > jobs.
>>> >
>>> > HTH,
>>> >
>>> > ? Trustin Lee, http://gleamynode.net/
>>> >
>>>
>>
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 


-----
Hardware/Software Architect
-- 
View this message in context: http://n2.nabble.com/When-is-ExecutionHandler-necessary-tp3831101p3843469.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list