So I spent a chunk of time over the last day or so looking at prior art – the efforts of others to solve the same problem. (I’m using “prior art” pretty loosely. I’m not by any means filing patent claims.)
Prior Art Round-up
The Hedera Project
Hedera is a Thunderbird extension, and probably the most direct solution to the Thunderbird and Ubuntu One integration problem. With Hedera, all contacts in all address books are sent off to Ubuntu One, with metadata to keep the contacts in the right address books. Metadata is also included to keep contacts distinct from one Thunderbird profile to the next (if you’re one of the rare users of profiles).
As of late, the extension has gotten a bit dusty – the author, James Tait, is currently working at Canonical, and hasn’t had much time to maintain it.
Despite that, it still does the job pretty well. I was successfully able to synchronize my contacts to Ubuntu One, which made me fist-pump. Great work, James!
However, after examining the code, I have a few concerns:
The first one that jumps out at me is the reliance upon a shell script to determine the DesktopCouch server port, as well as obtain access credentials. While effective, I think a more direct approach would be more appropriate. Perhaps I could develop a DesktopCouch XPCOM service that returns these values?
Contacts that are not branded with “Thunderbird” metadata are ignored. This means that contacts created from the Ubuntu One web interface are not brought into Thunderbird, unless the metadata can somehow be added there. I didn’t immediately see a way to do this. This also means that contacts from other applications (I’m looking at you, Evolution) don’t get brought into Thunderbird.
Since the contacts are also given profile metadata, it means that I only get those contacts if I share the same profile. This is problematic if I drop my computer in the river, get a new one, and fire up a copy of Thunderbird: my profile will be different, so my contacts won’t come in. They’ll still exist in Ubuntu One’s storage, but won’t come into my Thunderbird profile, unless I modify my profile string to match my old one.
Funambol Mozilla Sync Client
Funambol develops open-source mobile communications sync software, and it looks like Canonical is using Funambol to power their mobile sync services.
Users install the Funambol Mozilla Sync Client, which then syncs contacts with Ubuntu One over the mobile sync service.
According to the support pages, only Thunderbird 2.x is currently supported. Thunderbird 3.1.9 is the current version in the Ubuntu packages, and the Mozilla Messaging team is working like crazy people on 3.3 (where did 3.2 go? long story). Supporting Thunderbird 3 is a BFD.
Now, with respect to that last point, I’m not against paying for stuff. Money lets companies like Canonical, Funambol (and Mozilla Messaging, for that matter) survive. But I do think it’s a little silly that Thunderbird needs to pretend to be a mobile phone, and communicate through the mobile sync service. That’s why I said Hedera was the more direct solution.
If I got any of that wrong, I’m sure someone from Funambol will comment and correct me. 🙂
Bindwood is an extension that allows Mozilla Firefox to synchronize bookmarks via Ubuntu One. The reason I’m putting this up, is because a lot of good code has been written here to communicate with the DesktopCouch service. If I resolve a few licensing issues, it might be possible for me to leverage some of that code to make the Thunderbird + Ubuntu One project move faster.
Evolution-CouchDB creates a new address book called “Ubuntu One” for every user. Any contacts that go into that address book are sync’d with Ubuntu One, and any contacts that get added to Ubuntu One get loaded into that address book.
It’s an elegant solution, and addresses the issues I brought up with Hedera.
If I were to implement a similar solution for Thunderbird, it would mean that contacts between Evolution would be seamlessly imported into Thunderbird. The behaviour would be exactly the same. Consistency is good. Consistency means happy users.
Unless I hear compelling argument for something else, I think this the behaviour I’m going to implement.
Mac OSX’s Address Book
Mac OSX has it’s own internal address book, and many Mac-based Thunderbird users were crying out for integration. A developer named Peter Van der Beken karate-kicked the bug (and may have collected a bug bounty on it…unsure), and now we have OSX address book integration.
The OSX address book integration is very similar to Evolution’s behaviour: it creates a new address book within Thunderbird, and all contacts from the OSX native address book appear there.
As it stands, this integration is read-only.
Since we’re dealing with OSX, it means Objective-C is the name of the game. Here’s the code.
Except for one thing.
I spent most of yesterday examining this one, and I think I’ve got my head wrapped around it.
So, RDF stands for Resource Description Framework, and it’s a way of representing information in a way so that machines can make useful inferences and queries about that information. That’s a super-simplified definition. Here’s something a little more robust.
What does this have to do with Thunderbird and Ubuntu One?
Well, it turns out that the Thunderbird address book interface uses RDF to query / know about the address books that are available. So, when you pop open the address book manager in Thunderbird, and it populates the list of address books, it’s using RDF to get that information.
So what’s wrong with that? Well, it means that if I want to add a special “Ubuntu One” address book, it has to register itself with the RDF service as an RDFResource.
There’s two issues there:
Part of RDFResource is not scriptable, which means it’d need to be implemented in C++. So much for leveraging Bindwood / Hedera / Funambol.
So I might have to really start pushing on RDF removal from the address book. If I go that route, it means that Ubuntu One synchronization would not be available for anything earlier than Thunderbird 3.3. Ugh.
Sounds like it’s time for me to discuss this with my superiors. I’ll let you know what I find out.
I’ve been silent about my work for a few weeks, which is a shame, because one of the top reasons why I accepted a job with Mozilla Messaging was because I was free to talk about what I was doing.
I’ve been neglecting that right, but only because I’ve been holy shit busy. I’ve been blitzing my Ubuntu Unity integration work like a MoFo, and have gotten two Thunderbird extensions up on Mozilla Labs:
Ubuntu One is a service that allows you to sync things like files, bookmarks and contacts between different computers. (Incidentally, Mozilla has their own service called Sync to do something similar with bookmarks and passwords.)
That’s a pretty cool idea. Imagine it – you get a brand new computer, hook it up to Ubuntu One, and blam: all of your bookmarks and contacts are already there waiting for you.
Currently, however, Thunderbird does not support sharing contacts via Ubuntu One.
And that’s what I’m tackling next.
Ubuntu One Contacts Integration
At this point, my goal is to write an extension that will add a new address book to Thunderbird. Any contacts that are currently stored and shared via Ubuntu One will appear in that address book.
I’ll deal with adding new contacts later – for now, I’ll just do read-only, to keep the complexity down.
So stay tuned. Ubuntu One Contacts integration is coming…
I woke up after a night of fitful dreaming about long airplane rides, dip masquerading as hummus and missing socks.
I only had myself to blame for the socks. Em had awesomely helped me pack two weeks worth of clothes into a carry-on bag, and the socks had been my responsibility. Sigh. Oh well.
It was early at this point. Too early. I glanced at the bedside clock…6 AM. It’d been a long time since I’d been up this early. And yet, strangely, I felt fully rested.
Fully rested, and excited. I was in Hawaii, baby!
I was determined to make the best of the early morning, and watch the sunrise. So, I scrambled around, getting dressed – during which, I got a few shots of the sun starting to rise through my hotel room window.
Through the window of my room at the Ilikai Hotel24-Jan-2011 11:27, FUJIFILM FinePix A345, 2.8, 5.8mm, 0.5 sec, ISO 250
It was time to hit the pavement. I threw on my sandals, and stepped into the elevator. I tried not to think about my sock problem. I figured I would spend most of my trip in sandals, so the lack of socks really wouldn’t be an issue until later on in the trip.
The hotel was pretty close to the beach, but the sun was coming up fast, and I didn’t want to miss it. I started jogging, flew past the Hilton lagoon, and made it to the beach in time to take these shots:
It took me about 5 minutes to jog to the beach, and the sun had already come up quite a bit.24-Jan-2011 11:38, FUJIFILM FinePix A345, 2.8, 5.8mm, 0.5 sec, ISO 119
There was a rock barrier going out into the water. I walked down to the end of it for some shots, and took a video. The rocks were black, volcanic stuff.24-Jan-2011 11:41, FUJIFILM FinePix A345, 2.8, 5.8mm, 0.5 sec, ISO 129
I’m not a big coffee drinker, but apparently Kona Coffee is a pretty BFD. Before I left home, my Mom asked me to bring a few bags back. I didn’t have a chance on this morning though – the Kona Coffee shop was closed:
Precious Kona coffee. It's closed at this point, so I'd come back a few days later.24-Jan-2011 12:17, FUJIFILM FinePix A345, 2.85, 6.0mm, 0.172 sec, ISO 100
The hotel didn’t want you to forget that either – they were pumping episodes of Hawaii Five-O through some flat-screens near reception, 24/7.
Along with the hotel rooms, the Ilikai was also providing a meeting room for the team for the week. The meeting room was also where breakfast and lunch would be served. It was a pretty awesome arrangement.
Here are some shots of the meeting room.
This was our meeting room for the week.25-Jan-2011 14:23, FUJIFILM FinePix A345, 2.8, 5.8mm, 0.033 sec, ISO 124
When I got to the meeting room, there were already a bunch of people there, and I went around and said a lot of hello’s. Once again, a lot of names and faces flew by, and it was hard to keep them all straight in my head.
Breakfast was yogurt with granola, and what appeared to be banana bread. Delicious.
After breakfast, David Ascher gave a talk about the mission of Mozilla Messaging, and what we’d accomplished in 2010, and what we were aiming to accomplish in 2011. There was a nice and easy, accessible vibe in the room, and I don’t think it was just because everybody was wearing Hawaiian shirts – the whole crew just seemed to gel that way.
After the talk, we more or less figured out the schedule for the rest of the week. That day, we’d be doing a bunch of demos.
The demos were pretty cool. Blake did one on the account provisioning service that he’s been working on for Thunderbird:
Afterwards, there was a big talk about mail storage with David Bienvenu – one of the original developers of Thunderbird.
After that, it was lunch break. Salad and sandwiches. Very tasty. There was also some peculiar bread that had a sweet taste and was blue/purple inside. Very interesting.
After lunch, people just hacked on their laptops for a bit, and chatted. Smaller discussions about other projects broke out. People went out onto the patio for sun. Very relaxed and casual. Eventually, someone plugged in the XBox and the Kinect, and we watched David Ascher and Dan Mosedale do some extreme white-water rafting.
Dinner at Uncle Bo’s
Eventually, things wound down. Old habits die hard, and the group started to fold around 5PM. At that point, I packed up my stuff and headed back to my room. I talked to Em on Skype. I got ready for dinner – I’d be meeting the rest of the group downstairs at 6PM.
This is the view from my hotel room. That's the Hilton lagoon in the middle, and the beach and ocean just beyond.24-Jan-2011 13:02, FUJIFILM FinePix A345, 2.8, 5.8mm, 0.003 sec, ISO 64
Stuffed, we cabbed back home. Some of the team was headed to a patio on the beach, and I tagged along. As some live music played, I talked school and science fiction with Andrew Sutherland and Gozer. I also found out that Gozer is a pool shark, and we decided to find a time to hit a pool hall sometime over the week.
At some point, a wave of exhaustion hit me, and I decided to head back to the hotel.
I made my way back to my room, jotted down my daily notes, and nodded off.