Hi,
The request, wait, async response + close pattern seems to be a
pretty common use case though, especially with server side push
(AJAX), so it would still be good to have a solution that works well
allways.
Yes, and for this you don't need Comet, you need "Asynchronous
Servlets" they are somewhat different, although you can achieve the
same through
A) Using a regular servlet, and just hold on to the worker thread
B) Using a Comet servlet but with a short timeout.
In order for you to not timeout if your write is way delayed, then
you need to write some bogus data before the timeout happens
As of now, we don't have async servlets on the agenda, and we would
need to see what it takes to make Comet to behave like it.
Filip
Actually I looked at Jetty's continuations before I looked at Tomcat's
Comet. That seems to be the async servlet model. The way it works is
that the server side application can "wake up" the request after which
the response must be done immediately. This comes down to the
application causing the "event" method to be called with a specific
event. Possibly this approach could be used in Tomcat's Comet as well.
The reasons I didn't go for Jetty's continuations are:
1) it really is only request + wait + response, specifically
a) it would not let me process input as it comes in
b) it would only let me write output once, after that the response must
be done
Tomcat's Comet seems to be the ultimate solution: you can pretty much do
everything you want; especially handling of the input as it comes in,
and writing to the output without having to finish the response. The
only thing it needs to completely satisfy the async servlet model is
that the application can generate a kind of "CLOSE" event.
Regards,
Sebastiaan
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]