Comet Is the New Ajax
This time last year, a single word began a revolution in Web design. Coined and published on February 18, 2005, by May, the word “AJAX” was on everyone’s lips. It soon became the talk of the entire industry, and has revolutionized Web design as we know it—or, at least, it’s given plenty of bloggers lots to talk about.
Ajax is old hat now. This year, the word is “Comet.”
Comet is a “new” style of low-latency data transfer between the Web browser and server. Alex Russell, who coined the term in his March 3rd blog post, calls “this style of event-driven, server-push data streaming ‘Comet,’” though the term doesn’t stand for anything, unlike its cousin AJAX. In short, Comet applications maintain an open HTTP connection, reducing the latency for data delivery. The user no longer needs to take any action for updates to appear; updates to a Web page can appear in real-time (sans any clicks or other form of user interaction).
It’s hard to sometimes grasp what a technology does without a good reference point. Alex lists several examples, among which are GMail’s GTalk integration, Meebo, and Renkoo[1][2].
Thus far, the most prominent implementation is chat through a Web browser, but I think that some other uses are obvious: data entry and reporting among teams of researchers, Web-based stock sites such as Scottrade, Web-based e-mail applications, groupware, etc. Anything that involves data that is ever-changing and evolving would do well to take note of Comet.
Comet evokes the obvious scalability questions that come with any new technology like this, and Alex addresses this briefly, mentioning some server software for event-driven IO. I noticed that Renkoo uses one of these tools: mod_pubsub. He also mentions that the Dojo toolkit already supports Comet via dojo.io.bind(). Again, I saw that Renkoo uses this toolkit.
I’ve also been able to take a look at Renkoo (still in beta), of which, I must admit, I was very skeptical about at first. However, after seeing how forward-thinking they have been with their technology and how they’ve managed to leverage as much of the “coolness factor” as possible into their service, I think they’ll pull it off quite nicely. Of course, when you’ve got $3M and your laptops are covered in cool stickers, you can do just about anything.

10 Comments
but why do we need another fancy name? I have saw this in use since at least the year 2000
And AJAX has been around since 1998 with the XMLHTTP request object in Microsoft Internet Explorer. The combination of the tools (JavaScript and XML) didn't have a name until last year, and, guess what, when there was a name for it everyone could finally describe it with simple terms, technologist and lay person alike. Alex further explains the reasoning for the new name on his blog post. It's a good read:
http://alex.dojotoolkit.org...
Cool, but keeping open connections is rather expensive, not? Great for controlled intranet apps with lots of hardware (well -- it has worked for us for years). Otherwise, how do you scale this beast and deal with failover gracefully? OTOH, I'm glad to hear that there is some pre-built support for this in existing and supported toolkits -- makes future implementations that much more straight-forward.
Remember when Comet used to be called HTTP Push? Yeah, the kind of thing that was used in making IRC-like web apps?
Comet isn't really new (just like Ajax wasn't). Granted, a cute name for an old technology does wonders (watch the Ajax craze). But as far as I remember, HTTP Push wasn't a viable option for high-traffic sites, it doesn't scale very well, especially not on cheap hardware.
The difference between Comet and HTTP Push is that the latter wasn't used for anything except data, now Comet's uses the same concept to do JavaScript.
I'd love to see how Comet will perform against Ajax.
just wanted to add that AJAX does not necessarily have _anything_ to do with XML :-)
True, but it has everything to do with asynchronus HTTP transactions. I think many people are confusing AJAX as being a slick DHTML interface.
The biggest problem i see with comet is scalability. Its no problem to throw servers at the problem if your google or a well funded startup with a few users.
Nothing like abusing HTTP to make all your current scaling techniques obsolete.
Is it me or is the pubsub site unreachable ?
It's not just you. Adam Rifkin tells me:
bq. The mod-pubsub rewrite is something we're planning on open sourcing with a BSD license sometime in the next few months. 'Til then, the site is down.
Hooray! A new name for someting we call "http server push or something like that" since 2000. i agree with my previous speakers: scalability is'nt that easy AND you will be happy
to have the possibilities of XMLHttpRequest after running
against the first firewall and/or proxy.
also some (old) browsers (mostly khtml driven like safari,konqueror,...) rendering
the page right after they have received ALL data. a endless
load gives you a nice blank screen...untill you or the server
killing the connection.
anyway...a nice field to play with and for some applications
a good approach to get a step closer to "realtime".
tecM0