|
Comet uses either Streaming or Long Polling to Push Events from the server to the client through a protocol like Bayeux. Carol's A Comet Slideshow Example... shows, through instructions, screenshots and samples, how to do this using dojo on the client (JavaScript) and Grizzly on the Server on the GlassFish Server. Check it out! |
|
You may or may not know that Comet, Reverse Ajax, and Ajax Push are all synonyms and define a way to notify clients from a server. Jean-François has written many fine Comet blog entries, but this GlassFish v3 documentation on Comet is a very well written intro to the Comet paradigm and how to use it inside GlassFish v3 based on the Hidden example. You may also hear from Jean-François on Comet in a recent interview from this past JavaOne as well as read Ted Goddard's slide deck on IceFaces and Grizzly Comet from last week's GlassFish Day at Jazoon. |
The documentation also discusses the pros and cons of HTTP Streaming vs. Long Polling and explains how to code both.
|
I was going to wait until late next week, but I see that JFA's interview at InfoQ is out and the website is visible so no reason to wait. JFA's "free time" left by Alexey's lead role on Grizzly 2.0 is going to be reinvested into a Atmosphere a new project in the GlassFish Community that will focus on Comet. The project is just starting; the InfoQ article seems roughly accurate although some goal fine-tuning is still happening. I expect JFA will provide a more detailed description in a future blog entry. |
|
|
Grizzly 1.8.0 is out and this one has a lot of new material, including GWT support, better OSGi Compliance, improved Comet Support, improved performance, SPI cleanup and many more (see JFA's note). Grizzly 1.8.0 has already been pushed into the latest GFv3 builds. Also see the Release Thread and the complete ChangeLog. Congrats to JFA, Oleksiy, and the rest of the team and community. |
|
Shin Wai Chan has a nice set of blog entries ([1], [2]) on Comet (aka AJAX Push). He goes on to describe the code on both the client and the server and provides a link to a ready-to-use archive. The second part refines the introduction by describing the use of HTTP streaming.
Although they are documented with an earlier version of GlassFish v3, they apply equally to the latest TP2 promoted build provided you start GlassFish with this |
Comet is not Ajax, it's not polling, and it's not traditional servlet either. This set of short articles is a good way to grasp the Comet paradigm.
Update: Jim has a refined version of Shin's example.
|
Jean-François "Grizzly" Arcand has posted two slide decks he used last month during his European tour : • Grizzly (covers basics, use in GlassFish V3, and the recent 1.7 release) • Comet, aka Ajax Push (if you ask Jean-François, it's the best thing since slided bread, and who knows, he may be right :) |
|
Interesting Comet use-cases seem to be popping up on a regular basis. This time around IceFaces' Ted is showcasing the WebMC sample application to host a slide presentation over the internet. You can host your own infrastructure (maybe a great new feature for java.net) and check a demonstration here. |
In the latest version of this fully-documented-but-not-yet-final software, the interesting part is the use of Grizzly Comet to scale to a very large number of connections without killing the server with threads (ARP at work here). Unfortunately, I don't believe Skype scales as well in the number of simultaneous connections. Does anyone have a suggestion for an alternate solution for a one-to-many broadcast? A streaming solution maybe...