Skip to main content

Ubuntu One

/galleries/dropbox/u1-64x64.png

It has been a while since I said something © Loud Howard, Dilbert

As you may know, Canonical has started their sync service called Ubuntu One which provides file, contacts and notes synchronization across different computers. This is what was keeping me busy with random thoughts about possible application of such service.

First of all, I started learning Python. I’ve been using Perl since 2004 and this is pretty much the only scripting language I know (bash does not count :)). So I decided that I could both learn python and contribute somehow to Ubuntu One community. This is how it all started.

Here are some Ubuntu One internals:

Clients

There are three “real” ubuntuone clients, syncdaemon which synchronizes your ~/Ubuntu One folder, desktopcouch, which is a wrapper for CouchDB that configures CouchDB replication to UbuntuOne servers and Tomboy which uses Snowy protocol to access note sync service. All other clients (Evolution-couchdb and Bindwood) are simply interfacing with the local CouchDB instance and therefore do not connect to U1 server directly.

syncdaemon is a daemon written in Python that listens to filesystem changes and reacts accordingly. It communicates with U1 server using protobuf, Protocol Buffers developed by Google. It can be controlled to some extent via u1sdtool and ubuntuone-client-applet which is providing the “Cloud icon” applet in the notification area.

desktopcouch is a project that aims to provide "A CouchDB on every desktop, and the code to help it happen." Basically, this is CouchDB wrapped into python startup scripts and desktopcouch.records python library that handles authentication, JSON internals and other actions that should follow the specification.

Tomboy is a note-taking application written in C# which is now a part of GNOME project. Tomboy developers created their own server-side application called Snowy. Ubuntu One servers support the protocol used by Snowy therefore Tomboy can sync with their service as well.

The Server

Ubuntu One storage servers are located within Amazon S3 cloud. There are two types of subscriptions – the free one, that gives you 2Gb of space within U1 cloud and paid one – you will get 50Gb of space for $10 a month. Since Amazon charges for the storage anyway, the “free” storage plans are covered by Canonical.

Q: Okay, this is all fine but how do I relate to all this?

A: I like to debug things, search for solutions and I like new technologies. I have analyzed a lot of U1 client code so that I could write some myself, like the script that shows what local files are still not synced to the cloud. Or the diagnostic script for common Ubuntu One issues. Since everything is written in real-world python and the developers are usually available for discussions in #ubuntuone channel on FreeNode, I consider this to be an invaluable source of knowledge.

What can be synchronized?

The following items are supported at the moment:

  • Files and folders within ~/Ubuntu One folder

  • Evolution Contacts

  • Tomboy notes

  • Firefox bookmarks

However, since the service is pretty new there are some issues with the sync. The most common bugs are described in UbuntuOne wiki. Some of the fixes are available only in respective PPAs, such as ppa:ubuntuone/beta and they are heading towards Karmic update which takes time.

Any plans?

Canonical is planning to do phone sync as well based on Funambol. Additionally everything that is put to CouchDB is replicated to U1 servers…

One of my planned projects is to make Empathy (and every client built on top of Telepathy framework) store chat logs to CouchDB server. This will allow for complete chat history to be available on all machines even if the server does not support log storage. The code is almost there, but it is not ready to be released basically because this was my first exercise in Python and it will be simpler to rewrite it from scratch :)

Update: See the next post about Telepathy logging to CouchDB.

In case you have any suggestions regarding this post or you want to know more about Ubuntu One, feel free to post questions here and visit #ubuntuone channel on irc.freenode.net where I am almost always available as rtgz.