I approach this answer both with terminology and from a historical point of view.
As I wrote in this other answer , we can use one of several umbrella terms to refer to the set of technologies available for sending events from the web server to the web client asynchronously (and vice versa). The term " Push Technology " has been used for fifteen years (for the short history of Push Technology you can see this old white paper I wrote many years ago - full disclosure: I am the creator of Lightstreamer). Now the term Web streaming is gaining strength among IT analysts (see Gartner, Cool Vendors in Application and Integration Platforms, 2012) by Massimo Pezzini and Jess Thompson, April 11, 2012).
An important aspect is that we are talking about web communications, that is, the use of web protocols. There are many protocols and messaging technologies that are not websites (for example, most MOMs), and we do not consider them as part of Push (or web streaming) technology.
In doing so, you can distinguish between two subcategories of Push technology (or web streaming):
Both HTTP and WebSockets are web protocols.
If you explode HTTP-based push mechanisms, you can determine:
- HTTP streaming
- Long HTTP polling
- HTTP poll
Traditionally, the term " Comet " (superimposed on 2006 by Alex Russell) refers to both streaming HTTP and HTTP polling. But keep in mind that the first implementations of HTTP streaming will return to 2000 , long before the term Comet was coined (examples are buttons and Lightstreamer).
Now WebSockets simplify the implementation of web streaming, especially for the "reverse" channel (messages sent from the browser to the server). For a more detailed explanation of the features of the reverse channel via HTTP, see the final part of this article that I wrote for CometDaily: http://cometdaily.com/2011/07/06/push-technology-comet-and-websockets-10-years- of-history-from-lightstreamers-perspective /
As Phil noted, the comet is still necessary and will probably continue for several more years, since not only old browsers (including IE9, which do not support WebSockets ...) work around it, but also endless parts of network intermediaries that donโt speak WS. For example, we saw that some mobile operators in some countries (for example, Vodafone Italy) support WSS, but block WS. Thus, a world without cometary โhacksโ is still far away ... And let me add to my personal note that I never liked the term โhackโ applied to comets (or, from a more correct historical point, viewing applied to an HTTP stream and a long HTTP poll). Working on these methods for 12 years, I can say that we managed to refine them so much that they became a full-blown technology, completely reliable and used every day in many critical production scenarios (in the field of finance, aerospace, and military, to name a few industries )
Now imagine a world where WebSockets are universally supported and a comet is no longer needed. What do you get exactly? Well, just bidirectional transport, nothing more ... At the top you need to build everything: a messaging protocol (possibly based on pub / sub), a server-side interface to talk to your server code, and a good set of optimization methods and algorithms flow control, including bandwidth management, data aggregation, automatic throttling, delta delivery, etc. Itโs good that both messaging protocols and optimization mechanisms are already implemented by good Comet solutions. Thus, expanding legacy Comet servers to support WebSocket is a natural evolution that all of our vendors have implemented.
So, in the near future, WebSockets may make Comet transport obsolete, but it will need to suck all the higher levels already implemented and well tested on traditional Comet servers.