solang-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Solang-devel] The 'tracker' branch


From: Debarshi Ray
Subject: [Solang-devel] The 'tracker' branch
Date: Thu, 24 Dec 2009 16:11:18 +0200

For the last few days I have been trying to make Solang use Tracker
0.7.x [1] as our meta data store instead of SQLite. Most of the code
is in a separate local branch, named 'tracker' with me. I have not
published it yet, but will do so in a day or to.

The major change was to convert our internal interfaces from being
synchronous to being asynchronous. eg., previously to save something
we would call Database::save, but now it would be Database::async
which takes a sigc::slot which is invoked on completion. The main
reason for this is that our communication with our meta data store,
ie. Tracker, is happening over DBus and one should not use blocking
DBus calls [2], even though it is possible to do so. At times
asynchronous APIs can be a bit of a pain, but there is a major
advantage. It reduces the need to deal with multi-threaded code.

Another fallout is the way we look at importing photos. It is now
possible query all the available photos indexed by Tracker at startup
and then update ourselves automatically as the user copies and deletes
photos from his system (and eventually "the cloud"). So the situation
is different from the way we conventionally look at importing photos.
Of course the scheme breaks if the user has asked Tracker not to run
the indexer, in which case we would have to insert the photos into
tracker-store in a way similar to what we had before. However I am not
bothering to implement that scenario right now as it won't be our
primary use case. (Heck they are even running Tracker on mobile
phones!)

Happy hacking,
Debarshi

[1] http://projects.gnome.org/tracker
[2] http://smcv.pseudorandom.co.uk/2008/11/nonblocking/
-- 
One reason that life is complex is that it has a real part and an
imaginary part.
    -- Andrew Koenig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]