|
|
Comet: Beyond AJAX
|
03/27/2006, By Dr. Phil Windley
|
Here are some examples of systems that use Comet: GMail, GTalk, JotLive, Renkoo, Meebo, cgi.irc, KnowNow, and others. Note that Comet isn’t a framework or toolset, its a concept like AJAX. Alex is coining the term Comet so that it has a name.
How is Comet different from AJAX? In an AJAX application, the client drives the interaction. The problem is that context and manipulated content go stale at different times.
Comet application fight lag by avoiding HTTP and TCP/IP set-up and tear-down and a single connection is re-used. But the big kicker for AJAX is polling latency which Comet avoids. The big takeaway: transfer only the necessary data, exactly when it’s most relevant.
There are two implementation techniques: Long-polling where you reconnect after every datagram. This is simple to implement with XmlHTTPRequests. Another method is to use multi-part XmlHTTPRequests. This works differently on IE and Firefox and doesn’t work on Safari. No known system does this portably today.
Read More...
|
|
|
|
|
|
|
|
|
|
|
|
|