Some Technical Details

We're not sure if anyone is interested, but here are some of the technical details behind Gmail Notes.

Gmail Notes became technically feasible when Google released Gmail Version 2 in late 2007. One of the great features in Gmail 2 is that each conversation can be accessed by a persistent URL. More precisely, each Gmail conversation has a unique, persistent identifier that can be mapped into a URL. And that identifier can be easily retrieved from the browser and used as a persistent index for each note. To implement our system, we needed three things:

  1. A server to store notes online
  2. A way to detect the current Gmail conversation
  3. A user interface to display and edit notes

To store notes online, Google provides another excellent resource in the Google App Engine (GAE) framework, which was first released to the public in early 2008. Applications are very easy to develop using the Python programming language. When uploaded to the Google infrastructure, these applications run "in the cloud". The design of the Gmail Notes server application is based on what is called a RESTful architecture, and we also use JSON (javascript object notation) for the data interface. Unfortunately, we can't point to any good working definitions of REST (we think the Wikipedia entry is disappointing) or JSON, but please trust us when we say that adopting these two techniques made the design easy to implement. And with Google App Engine, it was very easy to get a working note server, which, admittedly, is one of the simplest web applications you could write.

As for detecting the current Gmail page, we wrote a browser extension to track the current URL in the address bar. The extension parses the URL to check if it is a Gmail page and if so, in also extracts the persistent conversation identifier.

The user interface is an html/javascript "web application" that runs in the Firefox sidebar. The information from the browser extension is passed to the sidebar application, which connects to the Gmail Notes server to retrieve notes from the online datastore.

That's all you need to add notes to Gmail. If it is that easy for us, it makes you wonder why the folks at Google won't take a day or two to put their own note feature in Gmail...