Still Playing in the Cloud
Matt Wood (we really need to sort him out his own login) gives an update on his XMPP experiements...
I've made a little time recently to move my previous XMPP experiments forward a little. Here are the results.
I've started echoing the stream of text that passes across the little screens of DAB radios into XMPP space. We call it 'live text' and it's frequently entered by production staff in a studio as a show is actually being broadcast, so it's timely but with a very short half-life. Seemed like a good fit for XMPP delivery!
You can find the live text at grouphug.hellomatty.com: point your client at the group chats at firstname.lastname@example.org, email@example.com, firstname.lastname@example.org... Feel free to hook this into your own applications...
The backend was again written with XMPP4R which I'm still finding very easy to work with.
We currently use a very lightweight but proprietary protocol and server to get this text into the Flash widgets for iPlayer and the radio network sites. On the assumption that it would be just better to use an open protocol for this I'm hoping to spend some time with Tsung soon to see whether we can make XMPP scale comparably. If you've any scaling war stories I'd really like to hear them - to be competitive we'll need to support at least 100,000 concurrent clients without breaking a sweat.
By popular request I've switched federation on at hug.hellomatty.com - this means you no longer need a hug.hellomatty.com account to subscribe to the now playing and live text streems - just use your regular jid or gmail account.
Paul asked me whether XMPP could go through firewalls and the answer is YES. This is important if you've a large client base any number of whom may be behind a corporate firewall that only allows 'safe' traffic through. The BOSH spec allows you to tunnel XMPP over HTTP in a way that doesn't hammer your server in a polling frenzy but which still respects timely content deliver and which plays nicely with proxies.
Very Live Text!
The first pulls the live text for Radio 4 into your browser and hopefully shows how little code you need to script XMPP from your browser. It also shows you how to do 'anonymous' logins, and how to work with JSJaC's callback-based programming model.
The second tracks the 'now playing' feed I presented last time. Here you can see basic support for the XMPP extensions you need to get 'user tunes' working (rosters, entity capabilities and personal eventing via pubsub) layered on top of JSJaC.
I also noticed that the tune spec was updated to allow you to publish your rating of the tune that's currently playing. So with this app you can click 'Pop!' or 'Drop!' buttons to publish your (dis-)pleasure with our playlists. From a public service perspective a federated standard for scrobbling certainly seems kind of interesting, especially if you worry about who owns your attention profile.
Next up is some benchmarking with Tsung, and I've a couple more toys in the pipeline. More here as it happens...
Your comments are, of course, very welcome!