Can you share ChannelFactory / worker threads in a p2p app?

Trustin Lee (이희승) trustin at gmail.com
Sun Nov 22 19:10:11 EST 2009


When I design Netty API, sharing worker threads for client and server
side seemed to complicate the API too much comparing to the gained
performance, and therefore the worker threads are not shared by
different ChannelFactories.

If there is obvious advantage in performance, I'd like to implement it
though.  Please let me know if you find something.

Thanks

— Trustin Lee, http://gleamynode.net/



On Mon, Nov 23, 2009 at 8:42 AM, Thingfish <jannick at ovja.dk> wrote:
>
> Hi
>
> I'm currently in the process of coding a peer 2 peer app on top of Netty. By
> definition each peer acts as both a server and a client, which means that I
> currently make use of both the ClientBootstrap and ServerBootstrap   to
> support "connection setup" in both directions. Once established "incomming"
> and "outgoing" connections are indistinct able, and for this reason they
> share the same pipeline factory.
>
> My question is, if its possible to also have them share the same worker
> threads and selectors? Currently the use of seperate NioClient and NioServer
> SocketChannelFactories means, that two disjoint sets of worker threads and
> I/O resources are created. As both these worker pools deliver the exact same
> service, it would be more efficient to avoid the extra threads.
>
> --
> View this message in context: http://n2.nabble.com/Can-you-share-ChannelFactory-worker-threads-in-a-p2p-app-tp4048241p4048241.html
> Sent from the Netty User Group mailing list archive at Nabble.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