In recent weeks, there has been an ongoing battle at wikipedia over the definition and details of the Comet (programming) page, with the end result being that a 6000 word page on the history, techniques and implementations of Comet, has been cut down to three sentences that barely define what Comet is.
Much of this dispute has been due to culture clash and strange wikipedia policies that result in the contributions from those with direct experience in Comet having their contributions devalued due to fears of advertising and conflicts of interest, with the result that the text that is favoured is written by people without Comet experience?
However, at the root of the issue is that there is no really good definition of what Comet is! I think some of the contributors to the wikipedia page were hoping that it would become that good definition, but there is a wikipedia policy that prohibits any original thought, so any clarification of the term cannot be organized there.
“Ask Alex Russell for the definition, as he created the term!” I hear you say. Unfortunately, as far as wikipedia is concerned, we can’t look at the creation of the term by Alex, as he is apparently a self publishing non-notable tech blogger (in wikipedia terms), and thus the original blog is not a sufficient citation. In some part I agree with wikipedia on this, namely that we should look to current usage rather than historical intent when seeking a definition of what is and is not a Comet web application.
Thus I’d like to pose a couple of questions in this musing about the definition of Comet:
Is Comet Ajax, or just Ajax-like?
Is Comet HTTP only?
The original definition, and many Comet articles use the phrase: “long-lived HTTP connections” to describe Cometd transports. Can a Comet application use a raw TCP/IP socket from flash and still be called Comet? Can a Comet transport used the FTP protocol from the browser and still be called Comet?
Does a browser have to be involved
If Bayeux is used to communicate over HTTP to a non browser client (e.g. a Java swing application), is that Comet?
Does any of this matter?
Ajax itself is probably not the most well defined term. Is a good definition of what Comet is needed (other than to permit a more complete page to be created on wikipedia)?
In my not so humble opinion, I believe that a good definition is Comet could be: “An Ajax web application that uses open standards based protocols to transport asynchronous events from the server to the client with minimal latency”. I like this definition because declaring Comet as a subset of Ajax means that any browser developments that become an acceptable part of Ajax, become an acceptable part of Comet. I also believe open standards are important for Ajax, and thus should be important for Comet. Using flash plugins would render a transport to be Comet-like, but not Comet.
To answer my questions above:
- Comet is a subset of Ajax
- Comet is not HTTP only, but it does need to use an open standard. FTP and BOSH would qualify, but something over a raw TCP/IP socket would not, unless socket access became part of the browser.
- Comet is to the browser. A swing client using Bayeux would be using a Comet transport, but would not itself be a Comet app
- Not really, but I’d like to hear some feedback and alternative thoughts anyway.