Wednesday, May 17th, 2006

COMET with Apache and Jetty

Category: Comet

Dietrich Kappe has been wanting to do some COMET, using Apache and Jetty as the server side piece. His experience shows that it isn’t easy to do yet:

I had intended to marry the nice Apache2 event MPM and Jetty 6 with Continuations in order to achieve a thrifty, thread-sparing COMET capable Java app. The idea is that the Event MPM module in apache frees up a thread when an open connection to the browser is snoozing and Jetty frees up a thread when the backend servlet is snoozing. There are two problems, however.

  1. The Event MPM module seems to only snooze between requests. With COMET the need to snooze happens during a requests, i.e. we are expecting something to come back from the server.
  2. The request handler module — in this case mod_jk or mod_proxy_ajp — and not the Event MPM module handles the socket connections to the servlet container. From my reading of the most recent SVN branch, the modules are using blocking I/O and not polling.

It seems there’s still a bit of work to be done to make Apache and Jetty do the COMET dance.

There has been a lot of interest in COMET. Some people even prefer to see a world where the majority of Ajax apps are built using event-driven architectures including the network level. When will we have a simple way to do this on the server side? There are interesting vendors out there like Lightstreamer who are trying to feed into this market.

Posted by Dion Almaer at 1:37 am

4.1 rating from 42 votes


Comments feed TrackBack URI

ShortBus will be a good solution for comet.
It’s an HTTP based event system using comet.

Comment by David Davis — May 17, 2006


Comment by dsdssd — May 18, 2006


Comment by test — May 18, 2006

Leave a comment

You must be logged in to post a comment.