dev@grizzly.java.net

Re: [Grizzly2.0 - Issue 2] No Controller?

From: Ken Cavanaugh <Ken.Cavanaugh_at_Sun.COM>
Date: Wed, 18 Jun 2008 15:25:12 -0700
Jeanfrancois Arcand wrote:
Salut,

the second issue we had is the concept of Controller. Alexey proposed we get rid of this central notion and instead manipulate Transport object, with no relationship between them. I do think having a central object (Controller) to be able to set things like thread pool and SelectorHandler is a good idea and makes users experience simple.

On that one, I'm +0 :-) but let discuss the pros and cons.

I think we need a central object for resource management.
I proposed calling this simply TransportManager.  I think it needs to:
  1. Manage thread pool(s) (and this needs to be pluggable to handle things like Sahoo's scheme for request prioritization).
  2. Manage ByteBuffer pools (like the scheme I proposed, in which the SlabPool would naturally be found in the TransportManager).
  3. Act as a factory for transports.
What other centralized responsibilities should this class have?

Thanks,

Ken.