On Oct 4, 2007, at 8:20 AM, Alan Wright wrote:
> What exactly is Comet? what problem does it solve? When would I
> use it?
Comet is for streaming responses from the server, as a replacement
for polling. ("Comet" doesn't stand for anything, unfortunately.
It's just a unique identifier.) The server sends a new packet of
data to the client when an event occurs.
The best example might be a Flash administration or monitoring
application that updates the client dynamically as events arrive from
the server. The demo examples tend to be simpler, e.g. a chat
application, which have the same basic properties as a real
application, i.e. asynchronous updates, but might not be directly
It's a somewhat specialized capability, but if the application needs
async notification of the client, it's very useful for the app server
to provide the infrastructure.
Resin's Comet is solving two problems
1) Async notification/communication of the servlet thread using the
CometController. This is the main issue, really. The servlet thread/
request is single-threaded/synchronous, but Comet applications are
intrinsically multithreaded/async. Resin's implementation deals
with most of the threading issues, which will let applications avoid
threading issues later on.
2) Thread detachment and reattachment from the idle servlet request.
While the Comet servlet is idle, waiting for the next event, Resin
can detach the thread and use it for another request. This is a nice
side-effect and many comet implementations push #2, but really it's
#1 that's the main issue.
> Scott Ferguson wrote:
>> I've updated the Comet API to make it more like the Servlet API and
>> to avoid dependencies on Resin details. Details are at
> Alan Wright
> Athene Systems
> tel 0845 230 9803
> Athene Systems Limited
> Registered Office:
> Shieling House
> Invincible Road
> GU14 7QU
> Registered in England and Wales No. 3156080
> resin-interest mailing list
resin-interest mailing list