Independent asynchronous read & write.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Independent asynchronous read & write.

qbaze
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

Any suggestions?

Thanks,
Piotr

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Independent asynchronous read & write.

Harsha Godugu
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]