views:

173

answers:

2

I want to write an aplication that uses the Comets pattern - that is a request that can be responded to when an event occurs on the server, rather than only as a response to an immediate request.

What is the easiest application server to use for this purpose, is it:

1) Tomcat with its NIO package
2) Jetty with its continutations
3) or some other alternative

I would think the main criteria should be:
- Ease of use
- Reliability
- Speed

+1  A: 

I tried Tomcat/NIO last week. It started out very promising adn easy, but I soon ran into problems as there seems to be no way to send data from client to server after the comet request has been opened. Also you need an own abstraction framework for connection handling and some quirks and hacks for getting it running with different browsers. I forgot about that.

Use a server named StreamHub or a framework called Athmosphere to abstract over different servers. PubSubHub... may be another option. Jetty I have not tried.

Greetz, GHad

GHad
+1  A: 

Hey Ankur,

Definitely Jetty!

It's "continuations" approach is brilliant. The Tomcat6' stuff sucks 'cause -- who the hell want to handle NIO events in the application code?

Hope it helps.

artemv
Thanks artemv. Did you use it for anything, I'd be curious to know "generally speaking" what your app was.
Ankur