ARTICLE

Ubuntu One for Application Developers

by | Tue 6 Mar 2012

Most of you will be familiar with [Ubuntu One](https://one.ubuntu.com) as the personal cloud service in which you can sync your files, buy music, and more. While the Ubuntu One team has been working hard to expand the end-user quality and experience of Ubuntu One, I wanted to share my experience with working with Ubuntu One from the perspective of an application developer.

A lot of people don’t realize that you can build support for Ubuntu One into your application and they provide a rather nice Python library to talks over DBUS to do this. Adding this support was simple.

The [Ubuntu Accomplishments](https://wiki.ubuntu.com/Accomplishments) system was designed with Ubuntu One as a core piece. We didn’t use Ubuntu One because it *had to be Ubuntu* but instead that Ubuntu One solved a number of problems in building a decentralized application such as *Ubuntu Accomplishments*.

We wanted to be able to verify and validate accomplishments (so they can’t be faked), so we knew we needed a system in which we could transfer files over the network, process those files, sync the files back to one or more clients, and also provide a means in which you can view your trophies on any of your Ubuntu machines. Ubuntu One provided the ideal system for performing this syncing with the added benefits of being integrated into the Ubuntu experience.



Not that kind of sync.

So how does Ubuntu Accomplishments use Ubuntu One?

Like this:

* When you load the application and enable support for verified trophies, it creates a directory on your computer and then marks it as an Ubuntu One share. It then offers the share to the validation service Ubuntu One user (which is just a regular Ubuntu One user that I tie some processing functionality to).
* On the external machine (the *validation server*) I have a script that listens for Ubuntu One share offers and when the share comes in it accepts it.
* When an accomplishment has been detected on the client machine the trophy is added to the share, which then automatically syncs to the validation server, and there we listen for an Ubuntu One signal to then kick off the verification. The signed trophy is then put back into the share which then syncs to the client.

As I mentioned earlier there is a Python module that I use to talk to Ubuntu One, and this not only provides methods to access all aspects of Ubuntu One (e.g. creating, offering, refreshing, listing, and subscribing to shares) but also provides a set of signals that you can connect to detect Ubuntu One sync events and handle them accordingly.

What is also nice, and lesser known in the community, is that you can run Ubuntu One on a headless machine. This is exactly what I am doing right now by running Ubuntu One an OpenStack image. You can find out how to set up Ubuntu One in a headless environment [here](https://wiki.ubuntu.com/UbuntuOne/Headless).

Finally, many thanks to the Ubuntu Team for providing help and guidance for using their API.

**[Find out more about Ubuntu One app development features here](https://one.ubuntu.com/developer/)**.

An invitation-only accelerator that develops industry-leading community engagement and growth via personalized training, coaching, and accountability...all tailored to your company's needs.

Want to read some more?

Happy Holidays

Happy Holidays

Just a quick note to wish all of you a happy, restful, and peaceful holidays, however and whoever you spend it with. Take care, folks, and I look forward to seeing you in 2015!

The Impact of One Person

The Impact of One Person

I am 35 years old and *people* never cease to surprise me. My trip home from Los Angeles today was a good example of this. It was a tortuous affair that should have been a quick hop from LA to Oakland, popping on BArt, and then getting home for a cup of tea and an...

Feedback Requested: Great Examples of Community

Feedback Requested: Great Examples of Community

Folks, I need to ask for some help. Like many, I have some go-to examples of great communities. This includes Wikipedia, OpenStreetmap, Ubuntu, Debian, Linux, and others. Many of these are software related, many of them are Open Source. I would like to ask your...

Ubuntu Governance Reboot: Five Proposals

Ubuntu Governance Reboot: Five Proposals

Sorry, this is *long*, but hang in there. A little while back I wrote [a blog post](https://archivedblog.jonobacon.com/2014/11/14/ubuntu-governance-reboot/) that seemed to inspire some people and ruffle the feathers of some others. It was designed as a...

Ubuntu Governance: Reboot?

Ubuntu Governance: Reboot?

For many years Ubuntu has had a comprehensive governance structure. At the top of the tree are the Community Council (community policy) and the Technical Board (technical policy). Below those boards are sub-councils such as the IRC, Forum, and LoCo councils, and...

Dealing With Disrespect: The Video

Dealing With Disrespect: The Video

A while back I wrote and released a free e-book called [Dealing With Disrespect](https://www.dealingwithdisrespect.com/). It is a book that provides a short, simple to read, free guide for handling personalized, mean-spirited, disrespectful, and in some cases,...