Question: Why ExecutionHandler in netty only support upstream?

李巍 kouxing2000 at gmail.com
Wed Mar 24 03:00:20 EDT 2010


thank you very much, trustin, I found my fault in the code.

In my DownStreamExecutionHandler, I forgot to use the new Runnable Class.


On Wed, Mar 24, 2010 at 2:39 PM, "Trustin Lee (이희승)" <trustin at gmail.com>wrote:

> Hi,
>
> 李巍 wrote:
> > Dear netty users
> >
> >     Netty is supposed to support SEDA (Staged Event-Driven Architecture),
> > but in org.jboss.netty.handler.execution.ExecutionHandler, the executor
> is
> > only used in handleUpstream(), what about handleDownstream()? If I want
> to
> > only put the encoding logic in another thread pool, how to deal with
> that?
> > If I remember correctly, Mina support this.
>
> I doubt it will improve performance significantly, and that's why I
> didn't put such feature to Netty.  If you really want to do that, you
> could:
>
>  1) Copy ChannelEventRunnable and modify run() method to call
> ctx.sendDownstream() instead of sendUpstream().
>  2) Call executor.execute(new ChannelEventRunnable2(evt)) in
> handleDownstream():
>
>    public void handleDownstream(ctx, e) {
>        executor.execute(new ChannelEventRunnable2(evt));
>    }
>
> HTH,
> Trustin
>
> --
> what we call human nature in actuality is human habit
> http://gleamynode.net/
>
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20100324/c357e5dd/attachment-0001.html 


More information about the netty-users mailing list