Thursday, February 05, 2009

Synchronization case study: Address Book, the iPhone, and Google Contacts

The following is excerpted from the documentation for Spanning Sync, an application that synchronizes my OS X and iPhone Address Book contacts with Google's contacts. Read it and despair, but remember the fault is not in Spanning Sync ...
Spanning Sync - Sync iCal and Google Calendar

... The first option, “Preserve Address Book data” is recommended because it guarantees that names and street addresses in Address Book maintain their formatting. For example, a first name "Vincent" and last name "Van Gogh" doesn't become first = "Vincent", middle = "Van", last = "Gogh". The downside is that the extra formatting may keep autocompletion from working as expected in Gmail ... When editing contact names and postal addresses, do so in Address Book and not in Gmail if you're using the Address Bookcompatibility mode (recommended). Deleting these fields in Gmail is fine, as is editing other fields such as email addresses and phone numbers... Google does not allow multiple contacts to have the same email address. If you have contacts in Address Book that share the same email address, Google will reject all but one of them and Spanning Sync will notify you of the conflict.
Yes, Synchronization is Hell. Google and OS X Address books have different data models for a Contact. Full reliable synchronization is not possible.

Of course on can more or less sync Address Book Contacts with MobileMe, but MobileMe calendaring is unacceptably feeble so that's not an acceptable option. Attempting to sync Outlook contacts will produce lesser but similar conflicts -- at least until 10.6 OS X adopts Exchange Server's definition of a Contact.

I wonder if anyone at Apple understands this. I imagine someone did, but when he tried to explain the problem to Jobs he was banished to the Dark Tower ...

See also: Why you can't get your work calendar on your iPhone

Update: Read the comment from Charles Wood, one of the founders and developers of Spanning Sync. There's a reason I'm a Spanning Sync customer -- I appreciate that they tackle this terribly hard problem. Dang, but we're at a frustrating point in the general problem of 'synchronization' and data exchange. I can only hope understanding of the fundamental problem is percolating from engineering up to the executive suite ...


Charlie said...

In the case of contacts, Apple's data model is much more sophisticated than Google's. It's Google's lack of support for structured names (first name="Vincent", last name="Van Gough") and addresses that causes the problem.

Google is very aware of the problem and will hopefully fix it, but changing the data model that underlies Gmail is no small task.

But you're right--mismatches in data models is on of the the hardest part about sync. (Believe me, there are others.) If there were one standard model for contacts (including phone numbers, postal addresses, etc), calendar entries (including the dreaded "detached instance of a recurring event"), and other info, sync would be a lot easier.

Spanning Sync

JGF said...

I definitely appreciate how brutally hard your task is. I wonder if you knew how bad things would be when you started the sync business!

My only hope is that knowledge of the real structural problems is beginning to move from a few bloodied engineers up the executive chain.