Push Technologies over HTTP - Part 1
Posted on January 1st, 2009 in Code | Comments
While I’ve been looking for a job, I’ve been doing a lot of free time projects, designing applications and web apps for various social networking and video sites. Mostly little tools to make my life and others easier and help integration.
There is one thing that I wanted to talk about and that is the movement towards these push like services and technology.
There are lots of ways to do this but tonight want to talk about AJAX Comet and HTTP Long Polling. AJAX Comet (or Reverse AJAX) is a hack more or less on top of http to handle the “push” paradigm.
I sum a bunch of it in this video:
Download FLV Download MP4 (Mobile Quality) Download 3GP (Mobile Quality)
There are a few benefits and problems that you run into that I didn’t cover in the video. Probably one of the worst is HTTP proxy servers. This model will work through proxy servers, unlike some other methods that I’ll over later in this series. However some proxies servers will not allow you to keep the connection open for the full time HTTP allows (5 minutes) and cut you off early. This method also can cause just as much havoc as it would to you on your server side with threading as it could to proxy servers, since many of them will allocate a thread per each connection it has open. Using a site that is heavy on AJAX Comet behind one of those proxies may give your system admin a headache.
AJAX Comet is interesting in that it doesn’t violate any specifications of HTTP, but it does violate the spirit of how HTTP should be implemented in some ways, so some systems my not be used to handling this new type of traffic pattern with it.
Update: I wanted to help explain what I meant about XMPP and explain dispatching a little more since people are asking.
Update: Nathan Fritz updates with a nice reply on XMPP pub/sub and Seesmic:
There a number of technologies and resources that can assist with it this technique:
- Jetty WebServer - a pure Java web server that makes use of continuations and non-blocking IO (java.nio) to support lots of open connections.
- XEP-0206: XMPP Over BOSH - XMPP (Jaber)’s HTTP Binding/Bosh system spec
- ApacheMQ (Message Queue) - AJAX Comet/HTTP Long polling page
- liberator - commercial web server built for AJAX Comet
- lightstreamer - commerical web server built for AJAX Comet and HTTP Streaming
- CometDaily - a blog on Comet
- Blog entry that explains more of the technical
- Book: Comet and Reverse Ajax: The Next-Generation Ajax 2.0 (Firstpress)
