Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tomcat has a Comet implementation, this page is intended to serve as a quick FAQ to explain the basic question around Comet.

What Is Comet?

  • Comet is a client/server interaction handled over one HTTP request and one HTTP response
  • Comet is able to push data from the server and from the client, to over come the regular HTTP request polling scalability limitation
  • Comet is a way to do asynchronous servlets in Tomcat, ie send a response asynchronously to a client
  • Comet is implemented using the Comet Processor/Comet Event interfaces in Tomcat
  • Comet is an event based implementation, events are mainly thrown based on underlying IO
  • A presentation on Tomcat Comet can be found here "http://people.apache.org/~fhanik/ApacheCon2007-ZeroLatencyHTTP.ppt"

What Comet is Not.

  • It is not a socket API.
  • It is not a high level poller or poller API, for underlying poll()/select() methods
  • It is not a TCP socket, even though the events are fired based on IO

API Proposals

Currently there are two API proposals, one lead by remm(sandbox) and one by fhanik(trunk). Everything in here is up for change and comments. The proposals are not very far from each other, but confusion around Comet has lead to further confusion around the APIs. Here is an outline of differences

...