Earlier this year I got tasked with implementing a system which involved multiple mobile clients talking to a rendering server. The mobile devices had a fairly beefy browser (Nokia N900), so the client was clearly suitable to be delivered as a web app. On the server side, we already had a realtime graphics system I had written earlier, to which the web clients would need to talk over a bidirectional connection with near-realtime responsiveness.
Being a C/desktop guy with little network experience, my first intuition was to do the simplest thing I knew how to handle: linking a small embeddable web server (e.g. libmicrohttpd) into the render server, and devising some cheesy custom application-specific protocol over HTTP.
Luckily, my work partner is not as stuck in the 1990s as I am, and he suggested we use XMPP. I was sceptical at first (XML? A server written in Erlang? Do we really need to go there? I just want to tinker with my pointers...)
He showed me some demos of realtime XMPP web apps built with Strophe.js, and I was rather impressed. Then we went over our system's client/server design and how it would map to XMPP, and I was sold.
We ended up using many more XMPP features than I had initially imagined, including publish/subscribe and multi-user chat rooms. Had we gone with my original approach, these concepts would have been implemented in some haphazard way in the render server itself. Now the rendering system just talks to the XMPP server like any other client. It's stable, scalable and fast.
Still, while BOSH in the browser is pretty amazing in practice, it does feel like a hack that's stretching the reasonable limits of what web apps should be doing over HTTP. Hopefully this time next year I'll be able to say that one of the best technologies I've worked with in 2010 was HTML 5 web sockets...