dev@grizzly.java.net

Re: About recycling the server channel in XXXSelectorHandler

From: Minoru Nitta <minoru.nitta_at_jp.fujitsu.com>
Date: Mon, 15 Jun 2009 10:12:50 +0900

Salut Bongjae, Jeanfrancois,


I am delighted you have been investigating the issue I raised.
If I understand your proposal, you mean that the server socket channel
will be used as client socket channels too. Is this right? I think
the problem of my sample program will be solved if it becomes possible
in Grizzly. Moreover, the solution can reduce the needed resources
of similar programs.

I am concerned about the performance regressions too.
ConnectorHandler.connect creates a client socket and it becomes a
dedicated socket channel to the connected address. At this point,
received packets are handled by two socket channels (server and client).
If server socket channel is recycled, received packets will be handled
by one socket (i.e. sever socket. Is this correct?) and may result in
performance regression.

I believe Bongjae's proposal is needed in Grizzly to soleve the
similar problem, but I think user application should be able to select
which way server socket is used somehow. (configuration or setter method?)


Minoru