[Tracker] Review request : Bridge manager subsystem



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
as part of my gsoc project, I implemented a system to allow Tracker to
index online resources. It's basically split into two parts :
1. The bridges are small programs which connect to a remote webservice
and import data into Tracker via its SPARQL interface. They are
standalone processes and all expose a common DBus interface. They are
started by DBus activation.
2. A bridge manager, in charge of calling the bridges to ask them to
pull the data. Any program can talk to the bridges, here I implemented
a bridge manager as a Tracker subsytem. Basically, what it does is
list the available bridges, and call the synchronization method
(Pull()) at a given interval. The default interval is 300 seconds, and
is currently shared by all the bridges. It also exposes a DBus
interface which allows to set the Pull () interval and to force a call
to Pull() on one or all of the bridges.

Details :
All the code for the bridge manager is in
src/tracker-store/tracker-bridge-manager.vala. The subsystem is
initialized and shutdown with the bridge_manager_init (TrackerConfig
*config) and bridge_manager_shutdown () functions, which are called
from tracker-main.c, as for the other subsystems.
At startup, the subsystem creates a TrackerBridgeManager object and
exports it on DBus with path /org/freedesktop/Tracker/BridgeManager.
The object is deleted in bridge_manager_shutdown ().
The object basically lists the available bridges (they all have a
.desktop file in /usr/share/tracker/bridges), and keeps the list in
memory. Then, periodically and if the network status permits it, it'll
call Pull() on all the bridges.

Where to get the code :
git://git.mymadcat.com/tracker , branch tracker-bridges
Then, if you want to get some bridges to play with, first install
git://git.mymadcat.com/vapi
git://git.mymadcat.com/libtrackerbridge
git://git.mymadcat.com/bridge-manager
git://git.mymadcat.com/bridge-facebook
git://git.mymadcat.com/bridge-flickr
git://git.mymadcat.com/bridge-twitter
git://git.mymadcat.com/bridge-gdata
you first need to associate the bridges with the web service using
tracker-bridge-manager. See also
http://live.gnome.org/Tracker/TrackerWebService (a bit outdated, will
fix that soon)

Known issues :
- - All the bridges have the same pull interval, which is not optimal :
picasaweb and twitter are not updated with the same frequency...
- - If your config file exists but does not contain the
BridgePullInterval key, it'll not be created and the default will be
picked

Unknown issues :
I'm sure there are many... Please report them to me !

Cheers

Adrien
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqHE34ACgkQ8r/KOkHzAnF0cACgkLe7WYwO5q+KJnbVHqRZujvT
P6cAnjmUn6B3vFvsx4sfSSC2YfoMWAe0
=tgvq
-----END PGP SIGNATURE-----




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