Comet (Reversing the Web with Ajax 2.0)

Web 2.0 Expo Conference

Presented by Ric Smith of Kaazing Corp


  • Comet is about pushing data to the browser
    • In short streaming
    • Useful in SSL. A lot of handshaking goes on to set up the SSL connection. The fewer times you have to do that the better.
  • Often referred to as Pending POST or Hanging GET requests

Latency = BAD

Example usage:

  • Stock Tickers
  • Meebo
  • zimbra
  • facebook chat
  • gmail


  • iframe
  • XHR Long Polling
  • XHR Streaming
  • Binary socket stream

Comet uses the java Continuation class.
Which transport to use depends on whether or not you have to deal with proxies/firewalls.

XHR Long Polling

  • not very performant

HXR Streaming

  • HTML 5 has built in support in the “event-source” tag.

Dojo has something called “cometd” which is implemented using a publish/subscribe model.

Ric demoed a javascript only instant messaging client that used the XHR streaming mechanism. No polling used. New info pushed to the browser.

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply