PDC 2008, Day #1, Session #3, 1 hr 15 min.
My next session talked about the next version of something called the Microsoft Sync Framework. I’d never heard of the framework, prior to the talk. And I’m still not exactly sure where it fits into the full family of Microsoft’s cloud-based services and tools.
My best guess for now is that the Sync Framework basically lives in the Live Services arena, where it supports Live Mesh.
My understanding of where the Sync Framework fits in goes something like this. You can write an application against the Mesh Framework, allowing you to take advantage of the support for feeds and synchronization that are part of that framework. And if you wanted data synchronization between applications that run exclusively in this framework, you’d stop there. But if you want to synchronize data between legacy applications that were not written to be Mesh apps, you’d use the Sync Framework to write a custom sync provider for that legacy application. This would allow that application’s data to sync up with other Sync Framework providers, or with Mesh applications.
That’s my current take on where the Sync Framework fits in, but I’ll maybe learn a bit more in later sessions. One thing that wasn’t clear from Lev’s talk was whether Mesh itself is using the Sync Framework under the covers, or whether it’s something entirely different.
Lev talked very fast and sounded just a little bit like Carl Sagan. But once I got past that, he did a decent job of showing how sync providers work to synch up various types of data.
The basic takeaway here goes something like this:
- Data synchronization done properly is tough
- The Sync Framework gives you all the hooks for handling the complexity
Lev pointed out that getting the first 80% of data synchronization working is fairly easy. It’s the remaining 20%, when you start dealing with various conflicts, that can get tricky.
V1 of the Sync Framework has built-in providers for File Systems and Relational Databases. Version 2 adds support for SQL Data Services and for Live Mesh.
The bulk of Lev’s talk was a demo where he showed the underlying code in a simple sync provider, synching data between his local file system, his Live Mesh data store, and a SmugMug account.
The synchronization was pretty cool and worked just like you’d expect it to. Throughout the demo, Lev was doing a 3-way synchronization and files added, updated, or deleted in one of the endpoints would be replicated at the other two.
Lev also talked a fair bit about how you deal with conflicts in the sync framework. Conflicts are things like concurrent updates—what do you do when two endpoints change the same file at the same time? Lev demonstrated how conflicts are resolved in the sync providers that you write, using whatever logic the provider wants to use.
The Sync Framework seems a very powerful framework for supporting data synchronization across various data stores. Out of the box, the framework supports synching between a number of popular stores, like relational databases, file systems, and Mesh applications. And the ability to write your own sync providers is huge. It means that you can implement synchronization across the web between almost any type of application or data store that you can imagine.