How to Choose a Data Synchronization Technology – Offline & Collaboration
Microsoft Corporation
April 2008
Here at Microsoft there are a number of synchronization technologies that support offline and collaboration data solutions. The key technologies include:
- Microsoft Sync Framework Core Runtime
- Sync Services for ADO.NET
- Merge Replication
Why does Microsoft offer multiple sync solutions? Well, we believe it is virtually impossible to create a single solution that will fit everyone's needs. For example, IT administrators may look for more of a packaged solution that is easy to install and administer. ISVs and developers may be interested in a more embeddable and customizable solution. Ultimately, multiple synchronization solutions give you more choices at the cost of adding increased confusion. Hopefully this summary will help narrow down the choice for you.
The synchronization technologies can be broken down by flexibility and the amount of code required. In general, more code is required to get a greater level of synchronization flexibility.
.jpg)
Microsoft Sync Framework
One area of confusion we hear from customers is with the Microsoft Sync Framework. I believe it can be confusing because the Microsoft Sync Framework is both a product and a family of products. From the below diagram you can see that the Microsoft Sync Framework family includes a number of technologies that support offline and collaboration scenarios including:
- Sync Services for ADO.NET: Synchronization for ADO.NET enabled data sources
- Sync Services for FeedSync: Synchronization for RSS and ATOM feeds
- Sync Services for File Systems: Synchronization for files and folders
- Sync Framework Core Runtime: Synchronization runtime enabling custom provider creation
.jpg)
As such, a more appropriate question in relation to data synchronization is "What is the difference between Sync Services for ADO.NET and the Sync Framework Core Runtime (sometimes called the Sync Services SDK)"?
Sync Services for ADO.NET
Sync Services for ADO.NET was built to allow developers who were familiar with the concepts of ADO.NET to apply that knowledge to data synchronization through a very similar set of APIs to that of ADO.NET. Sync Services for ADO.NET provides the flexibility of a programming model like offline datasets and a richer synchronization feature set like that found in Merge replication. Sync Services for ADO.NET also supports synchronization over services, such as Windows Communication Foundation (WCF). Specifically, Sync Services for ADO.NET targets the following scenarios:
| Offline Database Synchronization: With Sync Services for ADO.NET you are able to build a solution where multiple remote clients connect and synchronize to a central ADO.NET database in a Hub-and-Spoke configuration. This enables occasionally connected devices to periodically connect and synchronize changes with a central ADO.NET database server. This topology is a common solution for remote workers such as sales reps or field service workers. | .jpg) |
| Collaboration Between Databases: Sync Services for ADO.NET also includes Peer-to-Peer capabilities. Through a custom Peer provider, collaboration between two or more SQL Server databases can occur (support is not available for SQL Server Compact). Unlike a Hub-and-Spoke architecture, this provider enables a SQL Server database to communicate and exchange information with any other SQL Server database. This type of scenario is useful in group scenarios where users (such as auditors) need to update information and then collaborate those changes with other group members. | .jpg) |
Sync Framework Core Runtime
.jpg)
The Sync Framework core runtime is similar to the Sync Services for ADO.NET Peer provider in that it enables collaboration between data sources. The key difference between the two technologies is that Sync Framework Core has the ability to exchange information with any data store, and not just SQL Server databases. So you may be asking yourself, if I can use the Sync Framework core to collaborate between SQL Server databases, why would I use Sync Services for ADO.NET? The answer is that you can. The difference is that Sync Services for ADO.NET has a high level of integration with SQL Server and as such makes building Peer to Peer much simpler because a provider has already been created and tested for you. With the Sync Framework Core, you are required to create your own provider to communicate with the data source. Although provider creation is a little more complex, it does give you increased flexibility and the ability to collaborate with any data source. Additionally, Sync Framework Core has support for managed as well as native code which gives a developer greater flexibility from a development perspective.
Merge Replication
Unlike Sync Services for ADO.NET and Sync Framework which are targeted towards developers and ISVs, Merge replication is targeted at IT and database administrators who are looking for a complete out-of-the-box synchronization solution that easily enables them to synchronize central SQL Server databases with client side (occasionally connected) SQL Server and SQL Server compact databases in a Hub-and-Spoke topology. Through wizards, stored procedures, and its own API, Merge replication can be easily configured and deployed. Merge replication also includes a number of out-of-the-box administration components such as a Replication monitor which allows an administrator to monitor various aspects of the synchronization system. Additionally common upgrade tasks such as automatic schema upgrades are included within the server side management tool.
About Microsoft Synchronization
For more information on the Microsoft Sync Framework, please visit our Microsoft Sync Framework Developer Center. If you have additional questions, please contact us at our Sync Blog.