Compartir a través de


Windows Synchronization Architecture

The Windows Sync APIs are part of a new synchronization architecture for Windows 7.

This architecture makes it easier for developers who want to write applications for the increasing number of people who use personal information managers (PIMs) to keep track of data, and who also want to make changes to a fully synchronized version of that same data on their computers at home and at work.

The following diagram shows the basic components of the Windows 7 synchronization architecture.

diagram that shows the basic components of the windows 7 synchronization architecture

On the left, the diagram shows a smart phone device that is connected to a computer using the Media Transfer Protocol (MTP), so that its contact data can be synchronized with a second data store (shown on the right). Even though this data store is depicted as residing on a computer, it might also be a cloud-based data store.

The data store of the device and the second data store are represented by synchronization providers. The two synchronization providers maintain metadata for each item in their data stores. That metadata contains knowledge about when and how each item has changed. Synchronization providers are the key components of the synchronization system, and they require the most development work. For more information, see Overview of Building a Synchronization Provider.

To synchronize the data in the two data stores, the synchronization providers for each store are connected by a synchronization session. The synchronization session evaluates the metadata from both of the providers, and then tells each provider which metadata it needs to send to the other provider to create a synchronized set of metadata. Finally, the synchronization session instructs each provider to use its metadata to update the item data in its data store.

The data store of the device is represented by the Windows Portable Devices (WPD) Provider. The WPD Provider is the universal abstraction for any device that is connected to Windows.

The WPD IPortableDeviceValues interface is used as the transport for passing metadata between the two synchronization providers. A synchronization provider must be able to convert metadata into and out of the format used by this interface.

Between the two providers, the new Windows 7 synchronization infrastructure is pictured. The synchronization infrastructure provides APIs that enable you to create and orchestrate a synchronization session. It provides you with three different ways to build a synchronization provider that represents the second data store: the Microsoft Sync Framework simple provider, the Microsoft Sync Framework custom provider, and the Windows Sync custom provider.

The Windows Sync APIs are a set of native interfaces in the synchronization infrastructure that contain all of the interfaces necessary to build a synchronization provider. However, you must implement all of the interfaces yourself. The Microsoft Sync Framework contains implementations of many of the interfaces so that you can build a simple synchronization provider, or a more configurable custom synchronization provider, by implementing a few key interfaces yourself.

Note

We recommend that you use the Microsoft Sync Framework simple provider to write your synchronization provider. It already implements many of the interfaces that handle the most difficult tasks involved in keeping your data synchronized. You only have to implement the portions of your provider that handle interacting with the data store, converting that data into a transferable format, and passing it to the IPortableDeviceValues interface for transport. To see how much implementation work you can save by building a Microsoft Sync Framework simple provider or custom provider, and a description of the costs and benefits of writing a synchronization provider by using Windows Sync, see Options for Building a Synchronization Provider.

 

Microsoft Sync Framework Documentation

Windows Sync Overview