Apple has so many definitions and uses for iCloud it can be hard to keep track. You store your music, you store your photos, you pass documents back and forth, and of course you can hammer on all that rebranded MobileMe functionality like calendar, contacts and mail. But buried among Apple's many descriptions is "backup." It might not sound sexy, but it might just be iCloud's best feature.

At a WWDC session after the keynote, Apple clarified how iCloud's storage works. Every application gets a sandbox to play with in iCloud, just like how applications currently store their own documents on an iOS device in a sandbox. Files that are placed in the sandbox get synced up to iCloud automatically, and then pulled down to other devices based on need and device capability -- a Mac might pull down everything, while your iPod touch might not even have the same app so it won't bother.

But the "sandbox" isn't just an empty Dropbox-style file folder. Apple has specific data types (and respective APIs for developers to use:

  • Regular files
  • Packages (a collection of files representing a document)
  • Shoeboxes (a large quantity of indexed files, like iPhoto's library)
  • Preferences

These same APIs were used by Apple for building iCloud functionality into its iWork apps, and there's plenty of interesting stuff here. For instance, Apple slices each file stored by an app into small chunks. When a change is made, only the affected chunks are updated. Apple also does automatic conflict resolution (that can be overridden by an app developer), and while metadata for every file gets beamed up to the cloud, actual syncing can happen peer-to-peer over local WiFi networks. And of course, since this is Apple, if a developer drinks the Kool-Aid and uses all of Apple's prescribed best practices to build (or rebuild) their app and store its related data, they'll get all of this functionality automatically (which means us users will get most of this functionality automatically).

But what's most exciting to me is the last item on that list: preferences. Apple tacked a little API on the end there called "Key Value Store" that could be hugely powerful, if embraced by developers. It tops out at 64KB, with a mere 4KB per key, and is meant for storing preferences related to the app. Apple even gives a few examples: stocks you're keeping track of in your stocks app (boring), cities you want to keep track of in your weather app (really boring), and the page you're currently on in a book (possibly really exciting, at least if you're Paul Miller).

While developers can do whatever they want with their 64KB, the capability of transmitting an application's current state sounds a lot like a Continuous Client enabler to me. Since Apple has this API built for both Mac and iOS (Windows, sadly, has been left out of this part of iCloud), your desktop app and your phone app can share preferences, with iCloud rapidly pushing any changes. This also removes the need for customizing applications every time they're downloaded, or every time you add a different device to your stable -- iCloud knows just how you like it.

If you read up on Josh's original dream of a Continuous Client, you'll quickly notice the far reaching possibilities. The nice part is that Apple has both document syncing and preference syncing in one ready-made service, so there's no reason for developers to hold back. I can imagine Apple even leading the charge in demonstrating the potential synergies. Resume editing a document in Pages on my iPhone right where I left off on my Mac? Finish an email reply on my Mac's full-sized keyboard? Yes, please. With Apple's newly tight relationship with Twitter, I could see my Mac client and my iPhone client chatting each other up -- perhaps informing each other of my latest Tweet-reading activities?

At the very least, tightly synced preferences should erase that age-old process of tweaking every app after a fresh install. A part of me will miss those blank slate days... but only a very small part. Of course, since Apple is killing MobileMe's Keychain, System Preference, Dashboard and Dock syncing with the introduction of iCloud, I'll have plenty to keep me busy.