[kde-services-devel] LokaRest and the story behind it

Josef Spillner spillner at kde.org
Sun Aug 31 20:28:32 CEST 2008


Hi all,

There's a cool new service-centric KDE framework available at:
http://techbase.kde.org/Projects/LokaRest

It started out as the necessity to set properties on people to indicate 
whether they're buddies or should be ignored. This is a common functionality 
with all sorts of social applications, including chat, gaming and general 
social networking.

A previous such widget only saved these properties locally. This makes it 
harder to switch clients, to access from other locations (roaming) and to 
look at the properties on web pages.
Therefore, LokaRest is able to synchronise such properties with a web service 
by providing a unified RESTful interface to them.

Currently, there is a somewhat silly demo application included with it that 
allows you to change values in a QTableView and synchronises them online. In 
the future this framework will be used for KDE 4.2 online gaming, among other 
use cases.

Here are a couple of issues when dealing with REST in KDE:

* On the lowest level, there is KIO. But KIO is very unsuitable for this task. 
The basic operations needed for REST are absolutely undocumented, don't 
always work and don't have a consistent semantic. For example, for POST 
there's a dedicate KIO::http_post method but not for the others. KIO::put maps 
correctly to the HTTP PUT method but forgets its metadata, including the 
essential content type. This needs a serious cleanup.
Any volunteers for KIO improvements?

* On the middle level, LokaRest would be used. Some aspects like caching and 
restarting failed operations are currently not yet fully implemented, but 
this will be solved soon enough.

* On the high level, there's still space for another framework or a LokaRest 
extension which can map resource models efficiently so one doesn't always 
have to mess around with URIs and the like.

That's all for today, and I'd like to hear comments of course :-)

Josef


More information about the kde-services-devel mailing list