users@grizzly.java.net

Re: Independent asynchronous read & write.

From: Harsha Godugu <Harsha.Godugu_at_Sun.COM>
Date: Thu, 10 Jan 2008 12:15:16 -0800

Piotr Bazan wrote:
> Hey guys,
>
> Scenario I have is:
>
> - 400 clients (400 or more channels opened)
> - many requests per channel (keep-alive) - client side sends a lot of
> requests asynchronously waiting for responses
> - server side request processing time short (< 100 ms)
>
> which one do you think is the preferable one to make reads and writes
> totally independent of each other? I can think of 3 now:
>
> 1. one selector Handler (not really independent)
> 2. two separate selector handlers - custom WriteSelectorHandler &
> ReadSelectorHandler
> 3. two different controllers
>
This requirement is slightly similar to Corba's requirement. Having One
selector handler per read and write and another selector handler for
listening for connections (accept/initiate connections) would suffice.
Remember, each SelectorHandler in latest Grizzly framework runs in a
separate thread. Unless the application needs to do something
additional there may not be a need for custom selector handler. Like for
example, upon accept (on server side) if you want to take some action,
then you would want to take custom approach. Same on the client side.
Also, check in Grizzly workspace for ansyn read and writes which was
added newly that would of great help too.

-Harsha.

> Any suggestions?
>
> Thanks,
> Piotr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>