Zeitgeist and Gnome-shell

Hi, all,

As many of you know, there is a project called Zeitgeist that is somehow
being integrated into Gnome-shell.  In this mail I intend to paint a
picture of what we want to do.

* What is Zeitgeist?

Zeitgeist is ~/.recently-used on steroids.  It is a service that keeps a
time-ordered log of things that happen during your session.  In
Zeitgeist's terminology, each of those things is an Event.  An event has
various properties:

	timestamp - when did this happen?
	actor - what application caused this to happen?
	subject - what is being referred to (e.g. a URI or a file)?

(There are other properties, but in this mail we'll only care about
those three.  For example, there are other properties that let you say,
"this file came from an attachment to a mail in Evolution".)

Various things log events into Zeitgeist.  We monitor your recently-used
list and feed Zeitgeist with events created from the data in that list.
There are extensions or plugins or patches for apps to log their actions
into Zeitgeist.  (All of this happens through D-Bus.)

Zeitgeist thus stores a log of things like

	- What files have I visited? (recently-used)
	- What web pages have I visited? (Firefox extension)
	- What Tomboy notes have I visited? (Tomboy add-in)
	- What IM conversations have I had? (Telepathy extension)
	- What music have I listened to? (Banshee plugin)
	- What applications have I launched? (GIO magic)
	- What pushes have I done? (bzr plugin)

That's the logging part.  But the interesting thing is how you can query
that log.

Zeitgeist provides a D-Bus API for querying the log in various
interesting ways:

- Give me the files that I visited within this time range.

- Give me the files that I've used most frequently with this app.

- Give me the files that I've opened close in time to this other file.

- Give me the apps that I use most frequently.

Etc.  This is done with a clever API based on providing an "event
template" with various wildcards.  This is not only for files, but for
any kind of subject you can put in an event, of course - thus it also
works for Tomboy notes or Banshee songs.

In terms of implementation, Zeitgeist has an "engine" daemon which
exports a D-Bus interface for adding or querying events.  All
communication with the engine is via D-Bus.  The engine stores its
database of events in an SQlite database.

There is also a separate daemon which monitors your
~/.recently-used.xbel and feeds events to the engine.  It also monitors
apps that get launched and creates events for those.  I'm not very happy
that this is a separate daemon, but it's a tiny amount of code that
could very well be folded into the main engine daemon.

* What gnome-shell wants to do

Two things:  a journal of the user's work, and jumplists.

The journal is very well explained in

Jumplists are not as well defined; the meatiest discussion I've found is
in https://bugzilla.gnome.org/show_bug.cgi?id=609114

* Code

There is a 'zeitgeist' branch in gnome-shell's usual repository at
git.gnome.org.  This makes gnome-shell not use GtkRecent* to display
recent documents when searching, but rather to use Zeitgeist instead.
It also makes the right-click menus for application icons display
recently- and frequently-used files that you used with each app.  These
are minimal jumplists; the "let apps add their own commands to their
shell's menus" is out of the scope of Zeitgeist.

Based on that 'zeitgeist' branch, there is a 'journal' branch here:

That branch adds a third item besides the Windows and Applications in
the shell's overview - a "Recent Activities" item that displays a
time-based journal, similar to the one in the FindingAndReminding wiki
page.  This is what Seif blogged about:


Why is the journal branch not in git.gnome.org?  Because until a few
days ago, this was very early code.  We played with different rough
implementations of the journal and settled on the current one.  I will
personally take care of cleaning this up for hosting it in git.gnome.org
so that it is closer to the mainline work.

Sidebar:  I think having the journal as a third item in the overview is
not the best place for it.  I think you should be able to access the
journal directly from the desktop - think of having a "Journal" button
next to "Activities", or something as direct as that.  But that's a
discussion that we should not have right now, but rather later, when we
get a feel for how the journal behaves and for just how fluently you
need to access it.

* Can't you do this with Tracker?

Honestly, I don't know.

The following is my very biased and not thoroughly informed opinion, but
I know a thing or two.

Tracker has been advertised as a search/indexing engine ("google for
your files"), a metadata storage engine ("put RDF triplets here and
query them with a nice language"), and a database for storing anything
because you can store anything in a database ("Nokia stores contacts or
something there").

It does sound like you could implement something like the Zeitgeist
service - a time-based log of events - by using Tracker in some way.  I
mean, if you can index documents and also store contacts and store RDF,
sure, it sounds like you can implement *that*.

The point is that Zeitgeist is written already, to do what we've been
talking about since GUADEC 2008 (a time-based view of files, which
turned out to have more interesting implications).  Its database is
optimized for that kind of usage.  It's there and it works.

* But FindingAndReminding is more than a journal of stuff you did

Yes, indeed!

Of particular interest to me are the scheduling capabilities of a
journal-like view.  You want to drop a PDF in a future date to remind
you to read it, and you may want to see deadlines displayed in the
journal's timeline.  This doesn't even have mockups yet, but we should
indeed investigate it in the near future.

(Scheduling is *probably* not entirely Zeitgeist's job.  The obvious
thing is to start by showing to-do items from Evolution in the journal.
But let's talk about that later, when we have the journal working for
its originally-intended purpose.)

* Is that all?

For now, yes.  Thanks for reading.


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