Posts Tagged ‘zeitgeist’

Zeitgeist Hackfest Conclusions

Friday, February 11th, 2011

So I didn’t really stick to my original idea of reporting each day of the Zeitgeist hackfest in Aarhus. I guess this must be a classical hackfest syndrome – you give 120% during the day and when night draws near you’re just flat out of batteries. ‘nough with the excuses :-)

My own pet peeve, the Storage Awareness branch is inches from landing. It will allow the following kinds of new features:

  • Exclude files from a query that are not available to the user right now. Fx, because they are on a USB stick or require internet access when you don’t have any, or
  • imagine a journal-kinda-view where you can still see files you accessed that where on drives that are no longer attached. When you click them a dialog pops up “Please insert the drive ’2GB SanDisk’ in order to open the file ‘foo.txt’”.
  • When you plug in a USB drive you are presented with your most recent activity related to that drive
  • List which storage devices you’ve used an when

Michal was just all over the place doing integration work on everything between glib, libzeitgeist, gedit, totem, what not. From where I sit this guy just had an amazingly productive week!

Seif worked on the “grid plugin” for GEdit which is originally Michal’s idea and something we where all pretty hyped about. Really something that I feel could make a huge difference in the user experience of many Gnome apps.

Morten did a lot of work to get Zeitgeist ready for some deep Telepathy integration, this required a lot of hard thinking and a lot of discussion (with Seif and yours truly, but don’t worry we’re all still friends ;-) ). Getting it “just right” was not trivial, but I think we got to a point where we have a very good battle plan on how to get all the way to working code.

Siegfried worked on Gnome Shell integration and I think we should start seeing the fruits of that very soon now – and Federico joined remotely.

We also got some media coverage which, as often goes, was not entirely accurate, so Manish took the time to straighten out the facts :-)

Once again, big thanks to our sponsors – the opportunity they have given has made a huge difference!

Sponsored by Gnome Foundation BadgeCollabora logo

cs.au.dk logo

Zeitgeist Hackfest Day 1

Monday, February 7th, 2011

So. The first day of the Zeitgeist hackfest has ended. The venue at the CS department of Aarhus University worked really well. The wifi worked without a hitch and we all got keys and keycards to access the premises of the Incuba Science Park all 24 hours of the day. Awesome.

We spend the first 2 hours figuring out what items to focus on and who does what and Seif compiled it into a list of assigments on the wiki.

Seif, Morten, and I talked about what pieces we needed to fit together to make the Zeitgeist and Telepathy integration work perfectly. Got some nice and simple work items nailed down that’ll take us a long way.

While we did that Michal updated the zeitgeist-datahub to listen for the new DBus signal emitted by GDesktopAppInfo when they are launched. He also worked with Colin Walters on getting a nifty little patch that adds some extra info to the DBus signal that will make Zeitgeist even more clever when logging your app usage patterns. Uh… And Michal is brewing up something awesome for you as well, but I shall not steal his thunder :-)

My personal little project was to update and make my “Storage Awareness” branch from a while back ready to merge to trunk. There are some kinks to iron out before it’s ready, but I’m most thrilled about the prospect of getting this done.

Oh! And there is a #zeitgeisthackfest hashtag if you wanna bigbrother us on Twitter :-)

Zeitgeist Hackfest

Sunday, February 6th, 2011

Zeitgeist logo

Prepping up for the Zeitgeist hackfest which is kicking off tomorrow in Aarhus, Denmark. You’ve probably not heard a lot about this event before this late moment – that’s because it has all happened a bit fast. As we where internally discussing the possibilities of a hackfest a bit back, it quickly became evident that we needed it hold it Very Soon Now (TM) if we wanted all the core maintainers to have a chance of showing up.

I was wincing a bit because we recently expanded our family (can you believe I have three kids now..? I’m not sure I can) and I wasn’t very keen on traveling more than I already do with my work. Seif, being the man of action that he is, didn’t let that put him off an arranged that we could hold the hackfest conveniently close to my home. Not only that, but he pretty much did all of the necessary arrangements for getting a cool venue, accommodation, and not least – getting some sponsors to help us out. Seif – this one is to you – you rock man!

The sponsors are the GNOME Foundation and Collabora, and the venue will be the CS Department at Aarhus University, in the Incuba Science Park. All have been incredibly helpful despite our short notice. Thanks to everyone involved!

Sponsored by Gnome Foundation BadgeCollabora logo

cs.au.dk logo

I’m gonna have to hold the suspension a bit about what we intend to do with this precious opportunity we’ve been given. I’m just too tired right now – but my plan is to have a short daily log posted on my blog each day. So by the end of this week you should all hopefully have an idea :-) Stay tuned.

Fwd: On Zeitgeist optimization

Friday, November 19th, 2010

I don’t think this has reached Planet Gnome yet – so let me just give some major props to Markus Korn for his awesome Zeitgeist optimizations. Go read it! The post has multicolor graphs and the whole shebang! ;-)

Zeitgeist Proceedings

Saturday, June 12th, 2010

As was announced yesterday Zeitgeist 0.4.0 is out. Time to celebrate!

I am quite confident that it’ll be an excellent component in the infrastructure behind the Unity file handling experience. There are some slight issues I want to resolve before I am in development nirvana, but my fellow Zeitgeist developers has already more or less agreed on their solutions so that is looking dandy :-)

Generally it feels great that we are so close to “feature completeness” with regards to what we mapped out at the Zeitgeist hackfest in Bolzano last year. The last major thing to land as I see it is the storage awareness that I blogged about a while ago. We still don’t have anyone being paid to hack on the core engine, so we’re not landing boatloads of code each day, but we are chugging along at a steady pace.

As I also hint in the linked announcement at the top, we have a series of announcements coming up for the various projects related to Zeitgeist – so stay tuned!

Unit tests I love thee

Wednesday, April 21st, 2010

So we pushed out Zeitgeist 0.3.3. I was hacking on a bug where we’d at times be notifying monitoring applications of deletions even if someone tried to delete an non-existing event from the log. When I landed my fix I only discovered that I had broken one of the unit tests (I swear I tested this before I landed my branch! ;-) ). Apparently one could no longer delete events with timestamp 0.

Just when I realized this I was going “Yuk! Because of this far out corner case I have to change my code from something beautiful an simple to something ugly”. Concretely I just had a if all(timestamps): do_stuff(), but since timestamps can be 0 I had to manually check the list. However as I was fixing my code I realized just how wonderful this was. That our testing suite even caught exotic stuff like this. Firstly events with timestamp 0 are events that would have happened 40 years ago. Secondly deletions are rare. But in any case – it’s wicked cool that we caught this in the tests. It really demonstrates the awesomeness of a comprehensive test harness. Way to go team!

Zeitgeist Storage Awareness

Sunday, January 17th, 2010

Leading up to our last Zeitgeist release (0.3.1) I hacked up our new Blacklisting- and Monitoring APIs, both things quite fun work and very useful API if I might say so my self :-) But I regret not blogging about it as I wrote it – we gotta keep them olde hype-wheels a’turnin’. So here we go about the next feature on my plate…

Storage Awareness

So what does the buzz wordy term “Storage Awareness” cover? We had a few requests from application developers like:

  1. “I don’t want to show online resources when there is no network interface up”
  2. “I don’t want to show work related to files on a disconnected USB drive”
  3. Or another one I just came up with: “When I plug in my USB-drive show my recent activity on that device”
  4. Very much related is how deleted files should be handled in the results, but I will not discuss that right now

Since Zeitgeist is a log and not a snapshot of your environment we will keep the information around even if you delete files or detach your storage devices. So you might indeed get data about subjects that are not readily available when you query the log. However, the use cases above seems valid and applications stat()ing each file:// URL in the result set seems like a very bad idea, so it would be nice if we could help a bit with this.   Even though we are “just” a log doesn’t mean we can’t provide some nifty API for application developers.

So our query API has flag that filters events to only those events with subjects that are “available right now”, it has not been functional until now, but it will be so for 0.3.2. Since we also log information about what storage medium each event subject uses one can also ask for recent- or popular stuff on a given storage medium.

Storage Identifiers.. Help?

We associate each subject URL with a storage medium via a unique string identifier. For stuff like USB drives we have the UUID readily available from GIO. For online resources we simply use the id “net” and I use NetworkManager to check for network availability (ConnMan should be easy too).

So far so good, but I have not been able to handle CDs (both audio and data) and DVDs properly yet. I am not a storage format expert so I don’t know if it’s even possible to obtain a unique identifier for a given data CD (or what have we) – at least I can only get the disk label from GIO and that is not unique (but it might very well be “unique enough” for this to work well in practice). So any help on obtaining real unique ids for CDs and/or DVDs would be appreciated. Note that I would like to use the G* stack and not introduce funky dependencies – and I am also not going to read the first N bytes and checksum those.

Next bump on the road is that it seems that I can not get the disk label from within from gio.VolumeMonitor‘s "volume-removed" signal handler (calling volume.get_identifier()). I just get a None whereas I get the right label in the "volume-added" handler. I can probably figure this one out, but any ideas are appreciated.

The Code

Hold on… While you can indeed dig out the code from Launchpad, it’s not a secret,  I would recommend that you wait a bit just yet. It’s not ready for testing (and not even wired up in the engine so you have to do that yourself). So no code pointer for you, sorry :-)

Totally not about Zeitgeist 0.3.1

Monday, January 11th, 2010

Yesterday we pushed out version 0.3.1 of the Zeitgeist engine. I am pretty hyped about this, but since I try to avoid posting too many release announcements on my blog I will talk about something completely unrelated in stead. Read the Zeitgeist 0.3.1 announcement in the Gnome Announce archives.

Big Numbers

As we where talking at the dinner table today I asked Liv (just 4y) “What’s the BIGGEST number you know?”. It was obviously that she enjoyed getting that question, and I almost felt I could look inside her mind as she was contemplating it:

The BIGGEST Number

With utmost self satisfaction (clearly believing that no one could possibly think of a bigger number) she replied “As big as the TABLE!”.

Gravity or No Such Thing?

Most intrigued by Verlinde’s claim that Gravity is nothing but an emergent force arising from entropy. It has everything a good theory should have: simple, and based on some novel ideas. I really really hope that he is right, because if he is then it might just be the biggest scientific breakthrough (in theoretical physics at least) I am going to see in my lifetime. His claims has one other trait that worries me though – when things look too good to be true, most people, who doesn’t live in a fairy tale, will know that they are indeed too good to be true. Follow the buzz on Google blog search.

Zeitgeist 0.3.0

Tuesday, December 1st, 2009

In between sick children, work, my daughters birthday, my son starting in kindergarten, and what have seemed to be an endless stream of bumps in the road which is otherwise known as life, I stole a few moments this afternoon and rolled up our first development release of the new Zeitgeist release series – Zeitgeist 0.3.0.

I am pasting the release announcement here because I know all you lazy ass busy readers out there wont bother have time to click a link to the gnome-announce-list archives [2] :-)

Hi,

On behalf of the Zeitgeist team I am proud to announce our first
development release, Zeitgeist 0.3.0, leading up to what will be our
stable series which will be 0.4. It is our intent to aim for a 1.0
release as soon as we feel good about the stable series, but that is
still a bit in the future. Now that we've crossed the initial hurdle
in the rewrite we expect the release cycle to be much shorter than
this one, although we have not settled on something strict yet.

As many of you know the bulk work on this release was done in the
Zeitgeist hackfest in Bolzano. Since we came back we been busy little
bees polishing it up and fixing bugs - trying not to flame each others
too much when discussing the designs :-)  Working face to face in
Bolzano gave us a unique chance to really discuss things through and
get to the bottom of the details. This will also affect other
developers a bit since...

We were bad boys and decided to change both our internal database
structures as well as our public DBus API. Sorry - but after long
discussions we all agreed that this was for the best. The new design
is leaps and bounds better than the old one. This means that you both
have to give up on your old log database, and accept that there are no
GUI written for the new API just yet. This is being worked on as you
read this though!

Something that might come as a shock to some other developers is that
we decided not to store annotations and bookmarks within Zeitgeist.
This should be done in Tracker or some other semantic metadata
storage[1]. Zeitgeist answers only when and how data was accessed, but
stores no information about the current state of the metadata. We will
be working very closely with Tracker from now on since 0.7 is a
blessed dependency for GNOME 2.30. Congrats to the Tracker Devs.

You can download the release from: https://launchpad.net/zeitgeist/+download

The NEWS entry reads:

First development release leading up to the stable 0.4 series. This
release features:

 - Complete rework of engine and DBus API. Read: apps written against 0.2.*
   will most certainly need an update (see fx.
   http://mail.gnome.org/archives/desktop-devel-list/2009-November/msg00019.html)
 - Public Python client API defined in zeitgeist.datamodel and
   zeitgeist.client modules
 - Documented public API with Sphinx (we'll have an URL for you shortly)
 - Changed Ontology from XESAM to Nepomuk.
 - Removed the Storm backend (obsoleted in 0.2.1).
 - Removed the Querymancer backend.
 - Support for event payloads (binary attachments to events)
 - An extension API for the core engine, allowing extensions direct
   access to the DB. There are already a handful extensions things in
   the works here, you will hear more about this later

There are a few DISCLAIMERS that needs to be attached to this:

 - The event notification/signals are not yet ready in the new DBus API.
   We expect to have that ready for 0.3.1.
 - We plan to support querying only for available items (eg. filtering out
   deleted files, not listing files on detached USB storage, etc.). However this
   feature is not fully supported yet, even though it is exposed in the API.
 - While we are pretty satisfied with the database layout, there may still be
   changes in the ontologies or concrete data extraction methods. This might
   require that users delete their log databases in order to rebuild them
   with the new definitions. Of course this will no longer happen when we
   go stable
 - Much related to the point above our event ontologies are not yet set in stone,
   and minor changes are expected
 - We have only one logger enabled for now. Namely the one monitoring your
   recent files. In coming releases this logger may well be deprecated in favour
   of application specific plugins.
 - And finally. Please note that this is a *development release*. We can not
   guarantee stability of services nor APIs, although we strive hard to keep
   things stable.

Cheers,

Mikkel

[1]: There have been talk about defining (and implementing) a very
simple DBus API for storing semantic annotations (bookmarks, tags,
comments, ratings, etc). In our internal speak such a service is
called a Repository. Tracker or Soprano would expose this API in most
cases, but on platforms where they are not available the simple
Repository implementation would be most handy. This being said, it is
currently not a high priority to implement a Repository, there are
alternatives ready in Tracker and Soprano.

[2]: Sorry it’s not a direct link to the announcement, because I am still waiting for my mail to get through. If you must see it in a mail archive then check the Zeitgeist list archives on Launchpad.

What We Talk About When We Talk About Zeitgeist

Monday, November 16th, 2009

There is a tangible confusion around as to what Zeitgeist is and what it isn’t; what it can do and what it can’t do. This is partly our own fault because we could have communicated this whole thing better, for instance we have some very outdated wiki pages lying around that you should probably stay away from until we updated them. In this post I aim to give a semi technical run down of the core Zeitgeist functionality and how we expose it for you to work with. This should hopefully clear out some confusion.

Events

The Zeitgeist daemon (also known as the engine) is a process that exposes an event logging framework as a DBus API. The structure of these events is that they have a block of metadata that describe the event itself (this is known simply as the event metadata) and another block of metadata that describes the subject, or subjects, that this event happened to (this part is known as the subject metadata). The metadata for the event looks like:

  • Timestamp – When did this happen. Milliseconds since the Unix Epoch. Note that we see events as single points in time, meaning that events don’t have a duration
  • Interpretation – Abstract interpretation of this event; what happened. Fx. “opened”, “saved”, “closed”, “send”, etc.
  • Manifestation – How the event happened. Fx. “user activity”, “notification”, or “scheduled activity”.
  • Actor – Who triggered it. This will typically point to the .desktop file of the acting application. It will most likely be an application, but it is not required to be so.
  • Payload – A free-form binary blob that you may attach to the event. This is specifically application specific and mainly intended to be a “back door” for people to do all sorts of funky hacks.

Each event has one or more subjects associated. For each subject we store:

  • URI – You guessed it! The URI of the subject
  • Interpretation – Abstract interpretation of the subject. This could be “Document”, “Image”, “Video”, “Email”, “Instant message”, “Contact”, anything.
  • Manifestation – How the subject is stored. This could be something like “File”, “Mailbox”, “Web page”.
  • Origin – A URI pointing to the origin or “patron” of the subject. For files this would be the parent folder. For YouTube videos it would be http://youtube.com
  • Mimetype – The format of the datastream representing the subject. Fx. text/plain, application/xml.
  • Text – Textual information added to the subject. This is not applicable for for types of subjects.
  • Storage – Identifier for the storage medium this subject resides on. We use this to make it possible for queries that return only events for subjects that are “available now”. Fx. some clients don’t want to show events for files that are stored on you USB pen drive when it is not connected.

Ontology – Or Data Description

In reality the metadata fields we store don’t contain simple strings like “Document” for the subject interpretation. It’s a bit more complex than that – sorry! We store a URI pointing to a formal definition of something categorized as a Document. This formal categorization is called an ontology if you want a word to confuse your friends with. We are fortunate enough that someone already wrote such a spec, namely the Nepomuk Ontology. So instead of just “Document” we store the string”http://www.semanticdesktop.org/ontologies/2007/03/22/nfo/#Document“.

Since Tracker also uses the Nepomuk ontologies you may take these formal classification strings and plug them directly into Tracker to find everything that Tracker considers a document.

We will also have an ontology for the event metadata as this is not covered by Nepomuk. We are actively working on this.

Getting Data Out – Querying the Event Log

We employ a template based query API for searching our log data. You send us a list of event templates you want to look for and how you want it sorted and we give you the results. So if you want to find all “open” events on subjects of type “Document” simply create an Event object, set the interpretaion to “open”-event and add a subject to the event template with the interpretation set to “document”. All other fields should be left blank. Send this template to us and we will give you the matches.

The list of event templates is collected into a big OR-query to imbue the consumers with more power.

Getting Data Into Zeitgeist

There are really no limits to what kind of events we could store. If you have a spare mobile with a in-built accelerometer and glue it to your front door then you could send an event over bluetooth to your desktop each time your front door opens. Probably there are better use cases?

The point is that the usefulness of Zeitgeist stands and falls with the events that you push into us. We can store anything that you can model using the structures I outlined above. I am pretty certain that people will not agree on the kinds of data they want logged, but we are ready for anything :-)

Normal users would of course not need to think about getting their data into Zeitgeist. What developers need to know is that we have a simple DBus API to insert events (surprisingly called InsertEvents). It is called InsertEvents and not AppendEvents or something like that for a reason. Namely that you are allowed to insert events that are in the past. This is useful if you want to import your Firefox history or what ever. If you try to log an event twice the engine will throw an error at you, so no need to worry about dupes.

Ok. I think that about wraps up what I intended to say for now. Hope it’s useful to at least one person out there! :-)