Portrait of Edd Dumbill, taken by Giles Turnbull

Subscribe to updates

Feed icon Atom or RSS

or get email updates

What I make

a conference management web application

XTech Conference
a European web technology conference

Dashboard, FOAF and phones

Today I spent some time integrating Dashboard with FOAFbot. FOAFbot is an application that spiders FOAF files from the web and then answers questions about them. Dashboard is a user interface for context-sensitive desktop information aggregation (try saying that with your mouth full!) It's also the current cooler-than-cool thing going on with the hip GNOME crowd.

screenshot of dashboard and phonemgrFirst off, I ported FOAFbot to use the Twisted network application framework. This meant I could easily add new network interfaces to it above and beyond the IRC interface. I added an HTTP interface, which responds to XML sent in POST requests.

Secondly (the harder bit) I wrote a new backend for Dashboard, httpbridge, which uses an HTTP connection to perform the two major functions required from a backend: getting matches for clues, and rewriting clues.

OK, so what does it do? Take a look at the screenshot. It shows that an SMS text message has been received by my cellphone. This number (obscured for privacy's sake) is then sent to Dashboard as part of a cluepacket. The cluepacket then gets sent to all the backends, including the HTTP bridge. The bridge talks to FOAFbot, and gets the information you can see in the panel at the top. In addition, the bridge augments the clue packet to include the information FOAFbot knows about that cellphone number. These extra clues are sent to the backends, and the bookmarks backend picks out all the bookmarks with "Edd Dumbill" in the title, which you can see displayed below.

Wow. That's a brief explanation of the best part of the day's hacking. It involved my first ever encounters with C#, and creative procrastination when I should be packing for OSCON.

If you want to play with this code, you're welcome, but I won't be able to support you right now. The twisted FOAFbot can be checked out from my subversion repository. The C# code for the HTTP bridge backend is in the "extras" directory, you need to add this into your Dashboard build. The protocol for bridged HTTP backends is described in the comments at the top of backend-httpbridge.cs.

blog comments powered by Disqus

You are reading the weblog of Edd Dumbill, writer, programmer, entrepreneur and free software advocate.
Copyright © 2000-2012 Edd Dumbill