This Week's Sponsor:

Kolide

Ensure that if a device isn’t secure it can’t access your apps.  It’s Device Trust for Okta.


iCloud To Avoid File Conflicts with Versioning

In the latest episode of The Talk Show with Dan Benjamin, Daring Fireball’s John Gruber hints at a basic versioning system that will be built in iCloud to avoid the file conflict dialog boxes that have been one of the major issues with the existing MobileMe service. In MobileMe, if things go wrong and the system thinks you have two different versions of the same file, a dialog box will ask you to manually choose one and resolve the conflict. According to Gruber, that will change with iCloud: rather than ask users to choose a file and resolve the conflict, the system will always decide which version of an item (Address Book entry, bookmark, and so forth) is the right one. Users won’t be asked to manually resolve an issue by picking the version they think is right. Furthermore, unlike MobileMe Gruber says iCloud will have a versioning system with an interface that will allow users to “go back in time” and choose another version – think of Time Machine or Versions, as implemented in Lion.

Here’s our transcript of the most important parts – make sure to listen to the full episode here:

Gruber: The new way does not involve merging and conflicts. […] It doesn’t mean that Apple has magically solved the tech difficulties of syncing. […]

You’ve got 3 devices let’s say. Server-side data stored somewhere on a server, and you’ve got an iPhone and you’ve got a Mac. All data is up to date, say Address Book. You have an entry for Dan Benjamin and all it has is an email address. In all three places it’s the same and I sit down at my Mac, I add your home phone # to your contact and then I sit down with my iPhone at the same time (say everything’s offline) and enter Dan’s home # manually, but I enter it wrong. What happens when you sync? You’ve entered two phone numbers in two places, and at the server there’s no phone number. As it stands now MobileMe often will offer you a dialog box telling you that there is a conflict. It presents it to you and you have to pick which one is right. […]

In iCloud I believe you will never be presented with such a dialog, no matter how much has changed in one of the instances while it was “offline”. The server-side iCloud, when there seemingly is a conflict, will make a decision and it will decide which one is the best (in Apple’s terms the “truth”). That is what Steve Jobs means when he says “The Truth is in the Cloud.” iTunes will decide which one is right and that’s it. iCloud will push that right one to any device that has this account that has a different version. But, here’s the trick - what happens if it’s not the right one? On the server side, it will remember all of the other ones, almost like versioning. There will be some sort of interface like “go and look at your contacts.” There will be some sort of way to say “show me previous versions and let me pick the one that is right”. You pick it and push it back up into the cloud and tell it “that’s the truth” and Apple will push it out.

Dan Benjamin: Whatever is the most recent change will propagate but here are previous versions to pick from if you want.

Gruber: Apple won’t reveal it but iCloud, on the server, will determine the truth when it detects a conflict that will never be published. It will act like a “black box”. Most cases it will go by the most recently implemented change – it will be undefined. The key is that if there is a conflict, they will remember the different conflicting versions. If it picks the “wrong truth” it will be able to go back and get the right one. That’s what I mean when I say no more merging or conflicts. iCloud will make its best guess at merging & conflicts other than having you pick it.

Dan Benjamin: Do you know this or is it just a theory?

Gruber: I know this. What I don’t know but I beleeve, again, is that I think iBooks is an example of this in action. If you have the same iBook on the iPhone and iPad and take them both offline and flip a couple of pages on the iPhone then flip a different number of pages on the iPad, and them put them both online and they go to sync their “read state” or “current page state” to iTunes servers, iBooks never presents you a dialog. […]

iBooks is and has been one of the testbeds for what Apple is now calling iCloud.

iBooks has indeed been capable of automatically choosing bookmarks, notes and read state for quite some time, even before iOS 5 beta and iCloud. Apple has made no official mention of iCloud web apps or versioning features yet, but the possibility of choosing past versions of a file seems to fall in line with Apple’s recent developments in basic, easy to use versioning for everyone as seen in the Lion developer previews.

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.