users@grizzly.java.net

Re: comet throttling

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 07 Jul 2008 21:10:09 -0400

Salut,

Cam Bazz wrote:
>
> Hello,
>
>
>
> how can we implement a
>
> logic that smoothly notifies all the clients in a round robin
> fashion?
>
>
> You might want to use a thread pool and get a thread from pool when
> you do a notification. With this approach, you also make sure you
> don't block on a client that isn't reading fast enough. You waste a
> thread, but at least other clients get the response in a "real-time"
> way. <mailto:users-help_at_grizzly.dev.java.net>
>
>
> I am sorry but I have not understood what to do here. are you suggesting
> number of threads = number of clients??? it does not sound logical to me.

Naaa no :-) My recommendation for you is to:

Context.setBlockingNotification(false);

Just the default NotificationHandler, which will use a Thread pool for
executing its notification process.

Does that help?

Thanks

-- Jeanfrancois



>
> Best,
> -C.B.
>