gwt Comet easier to implement on jetty or tomcat?
I saw the jetty has the connections library, which seems to make it easy to handle multiple connections on a single thread... does Tomcat have similar capabilities?
jcee14
2009-07-02 17:15:54
Yes, but with a different API. Jetty's method is more intuitive (request a Continuation and use that to "pause and resume" Servlet request). In Tomcat, your Servlet implements CometProcessor which defines event( CometEvent ) which is invoked at the start and end of the connection, when the client sends data and when an error occurs. Use ServletResponse.getWriter() for data to the clientJetty uses clever exception throwing magic; Tomcat (I think) maps more 1:1 to the underlying NIO API.http://tomcat.apache.org/tomcat-6.0-doc/aio.htmlhttp://docs.codehaus.org/display/JETTY/Continuations
Alan Donnelly
2010-02-12 04:28:04
Agree with @stevedbrown BTW Whichever you use will make little difference :-)
Alan Donnelly
2010-02-12 04:29:00
+1
A:
There is a GWT Comet Adapter which works with a standalone server called Streamhub. I host my Swing MVC app in Tomcat and use StreamHub as a Comet server.
Supertux
2009-07-21 15:53:52
A:
I agree with Supertux's answer - if you use Jetty or Tomcat you will have many more threads or connections in your main server - its better to offload the streaming connections to a server that was built to handle it.
codingfloor
2009-08-13 18:25:10