While still improving the 0.6.9x version of tracker for Fremantle (last week we released 0.6.91 with tons of bugfixing), we are also working on the 0.7.x plans. Philip has already described in detail what are we doing, and i think the most exciting feature is going to be the “observe changes about resources”.

The problem is easy to explain: you write your application (e.g. email viewer), populate its views with data from tracker (e.g. “last 10 emails”), and then… how does your app know when is a new email has been received? It does so because maybe evolution has already pushed a new one into tracker!

Obviously “polling” tracker every n minutes is not a solution, and the nice live queries are very complex and hard to implement properly. BUT we have come up with an easy solution that can help.

The applications will subscribe to an object (or more) in DBus (one object = one class in nepomuk), and then they will receive a signal when something happens in that category with the relevant URIs (e.g. an email is deleted in Emails category, a music file is added in Music class, a document updated, and so on). With this information, the app can decide what to do (e.g. deprecate the view, ignore it because now it is showing other info, query tracker about the relevant metadata, …) .

In coding terms: your email viewer will ask “last 10 emails” and subscribe to signals from “/org/freedesktop/Tracker/Resources/Classes/nmo/Email”. Then when a new mail enters the mailbox, the app will receive a signal “ChangeAdded ([list of tracker uris added])”. Here are some more details of the design.

Once we have this mechanism in place, it will be easier to use tracker as backend for user data in the applications: a nice query language + update notifications! It will also allow us to switch into a model where providers (e.g. a feeds monitor, browsers) push info into tracker, and completely independient applications just query it from there… and then to write a mashup app would we soooo easy… and….

P.D. Philip told me: “before you blog about this, it will be implemented”. Well… if i waited one more day…