XMPP

It's great to see lots of people jumping on XMPP at the moment, now that AIM has joined Google in opening up their IM network to XMPP and there's a nice new logo (SVG version please?).

Some people seem a bit too gung-ho about giving away their IM address to random sites to get alerts of new items instead of using feeds, forgetting that one of the main advantages of RSS over email alerts was that you could subscribe and unsubscribe at any time: no-one knew who you were, and no-one could keep sending you messages after you'd unsubscribed.

I'm also still debating how often XMPP is the right approach in situations where you already have XMLHttpRequest, message queuing services and dynamic DNS. Howerver, the state of XMPP libraries is good these days, particularly now there's xmpp4moz that makes XMPP available to Firefox extensions, as well as the existing libraries for other languages such as xmpppy (python-xmpp in Ubuntu/Debian).

I decided to follow up on my 'communicating with Amarok via an embedded HTTP server' to make a two-way communication between Amarok and Firefox using XMPP. In this, a Python script (modified from xmppstatusbot) runs an XMPP client that sends messages to and from Amarok, while a Firefox extension runs an XMPP client that sends messages to and from Firefox. Now, when a new track starts playing in Amarok, it sends a message to the XMPP client in Firefox, which then uses that information to build a 'Now Playing' page pulling together information from around the web.

These still need plenty of work to be done, but in case anyone's working on something similar I thought I'd post the code here in it's current state. Note that this is really for developers - there's no configuration GUI: you need to edit the python script and the overlay.js file to add the appropriate IM addresses and passwords for both bots, and the overlay.js file to set the address of the web page for which Firefox should open an XMPP channel.


XMPP flow diagram