Ain't afraid of no bugs

Just another boring blog

Akonadi sprint 2009/10

First of all, hello planet KDE!

Ever since I began to work on KDE PIM (porting Akregator to Akonadi) as a Google SoC student I’ve wanted to start blogging about it but unfortunately never had the time for it. Now thanks to swine flu I caught recently I can get some rest and look back at the past few years.

By now you all know that all the KDE PIM applications are being ported to Akonadi which brings lots of benefits. Frank Osterfeld blogged already about the progress we made porting Akregator. Unfortunately not much has happened since those days due to lack of time. But recently most of the KDE PIM hackers gathered at the KDAB office in Berlin for another Akonadi hacking sprint. And I decided to use this opportunity to take a break from my PhD and usual university duties and look into what is still missing in the RSS framework for Akonadi: search and filtering.

Filtering means picking specific RSS items from all incoming RSS items (also referred to as RSS articles) according the specified criteria and applying various actions to those items. In short words, much like e-mail filters. This turned out to be an easy task thanks to the general filtering framework for Akonadi developed by Szymon Stefanek as his GSoC project this year. All I had to do is extend a couple of base classes to make the core filtering library “understand” the structure of an RSS item. Though there is a general Akonadi filter agent I opted for creating a separate agent for RSS. Since the Akonadi filtering framework also provides a customizable GUI editor for filtering rules implementing the agent was easy. I’m still not sure what would be the right approach to filter items in Akonadi: one central filter agent for all kinds of data or separate agents per MIME type (email, RSS, contacts, etc). The bottom line is, it is now possible to write filtering rules such as “mark all incoming RSS items that contain ‘KDE’ in the title or content as important and add Nepomuk tag ‘KDE’ to them”. A long-standing wish in Akregator’s bugzilla I guess.

Creating a new filter

Editing filtering rule

After I had committed the filtering agent I moved on to search. This was a hot topic during the previous Akonadi meeting back in April and it was decided to base Akonadi’s search capabilities on Nepomuk. The Akonadi hackers have made an amazing progress in that regard since then and the Akonadi overlord Volker Krause showed off a Nepomuk e-mail feeder agent that runs in background, pulls emails out of Akonadi, takes them apart and pushes the relevant parts into Nepomuk. Then Akonadi uses SPARQL to create “live searches” represented as virtual collections in the client applications. Cool stuff.

My first thought was if that works already for email nothing stops me from doing the same for RSS. Well, it turned out there was no standard RSS ontology I could make use of to push RSS items into Nepomuk. With the help of Frank Osterfeld and Sebastian Trueg I handcrafted a simple RSS ontology and voila: all my RSS items got indexed by Nepomuk. Of course, it wasn’t a smooth ride. Nepomuk with the Virtuoso backend kept crashing leaving weird backtraces. But by the end of the meeting I was able to search RSS items by various criteria.

All in all, it was a productive weekend. I think, with these cool new features Akregator is going to be the best feed reader out there. The downside is that you have to wait until KDE 4.5. Yeah, Frank has a full-time job and I’m still trying to finish my PhD (my defense is scheduled for December, 10th, wish me luck!). Life is unfair, you know.

November 6, 2009 Posted by | Uncategorized | 9 Comments