users@grizzly.java.net

Want to migrate from Tomcat Comet to grizzly comet

From: ilya goberman <goberman_at_msn.com>
Date: Fri, 21 Jan 2011 14:57:04 -0600

Greetings,I have a Java server application that runs in Tomcat and uses Tomcat Comet NIO. The application is used to send market data to multiple (thousands) clients.It uses Comet persistent connections to send data from server to clients (infinite GET response). It also processes "normal" GET requests of fixed response length.
I have had a painful experience with Tomcat Comet/NIO. Besides the fact it has a large number of bugs, it has a design problem: writes block when client buffer reaches
32K. If I have a thread sending updates to multiple clients, it may
block if one of the clients is “slow consumer” stopping data flow to
multiple clients. There does not seem to be a workaround for it as
Tomcat Comet API does not expose the size of this client queue.

I want to potentially replace Tomcat Comet/NIO with Grizzly Comet. I have some questions:1) Do you think Grizzly Comet is suitable API for my project. I noticed it centered around CometContext that is a "topic". I really want to have a fine control of each client connection and do not want to send messages to a "topic". Is it possible? Does creating a CometContext per client seem reasonable?
2) Is there a way to control/ access client send queues? Detecting "slow consumer" is critical for my app.Any help is appreciated.Thanks