Microsoft Sync Framework

Last updated

Microsoft Sync Framework is a data synchronization platform from Microsoft that can be used to synchronize data across multiple data stores. Sync Framework includes a transport-agnostic architecture, into which data store-specific synchronization providers, modelled on the ADO.NET data provider API, can be plugged in. Sync Framework can be used for offline access to data, by working against a cached set of data and submitting the changes to a master database in a batch, as well as to synchronize changes to a data source across all consumers (publish/subscribe sync) and peer-to-peer synchronization of multiple data sources. Sync Framework features built-in capabilities for conflict detection – whether data to be changed has already been updated – and can flag them for manual inspection or use defined policies to try to resolve the conflict. Sync Services includes an embedded SQL Server Compact database to store metadata about the synchronization relationships as well as about each sync attempt. The Sync Framework API is surfaced both in managed code, for use with .NET Framework applications, as well as unmanaged code, for use with COM applications. It was scheduled to ship with Visual Studio 2008 in late November 2007. [1]

Contents

Architecture

The Sync Framework architecture Sync Framework.svg
The Sync Framework architecture

The Sync Framework runtime provides synchronization functionality, without being tied to any data store or data transport protocols. By providing data source specific synchronization providers, any data source can be supported. For example, using proper synchronization providers, files can be synchronized across computers, project updates synchronized across project participants, or media synchronized across devices. Sync Framework ships with three providers: Microsoft Sync Services for ADO.NET, Sync Services for File Systems, and Sync Services for SSE. Sync Services can be used to synchronize devices by supplying providers for the device. Similarly, PIM software such as Microsoft Office Outlook and media libraries such as Windows Media Player can also be supported by providing suitable providers.

The providers are used to enumerate the items in a data store, each identified by an Item ID. In addition, they also have to maintain synchronization metadata and the state of the data store, so that changes can be enumerated quickly. The metadata is maintained for every instance of the data store (replica) that the provider is attached to. The metadata maintained includes the replica ID, tick count (representing progression in time), conflict log, tombstone log, and the set of the changes the data store has seen (knowledge). A replica ID and tick count pair makes up a version and encodes the state of the data store until that time. Sync Framework defines a set of operation for the Knowledge object for a replica: Contains which determines if the store contains a specified change, Union to merge two knowledge sets, Project to project out the knowledge for a subset of the items, and Exclude to create a new knowledge set without the changes for a subset of the items. The metadata is managed by the metadata storage service which uses an in-process SQL Server Compact database to store the metadata on a per-provider basis.

The Sync Services API operates by creating a synchronization session, represented by a Session object. A synchronization session synchronizes data across two synchronization providers - one for the source data store and the other for the destination. Instances of both the providers are passed to the Session object. During a synchronization session, the destination provider sends the knowledge set of the store. The source provider compares the knowledge of the destination with the change set in the source to enumerate the changes and then transfer it to the destination. The destination provider makes sure the changes are not conflicting and merges the changes and updates the knowledge.

  1. Snapshot sync (download-only sync): The data in the data source (or a subset of it) is synchronized with clients.
  2. Upload-only sync: Data in the client is merged to the source replica.
  3. Bidirectional sync: Both the data sources can be modified independently and changes are synchronized with each other. An n-level sync is achieved by performing multiple bidirectional synchronizations.

Sync Services for ADO.NET

Sync Services for ADO.NET Architecture Sync Services.svg
Sync Services for ADO.NET Architecture

Microsoft Sync Services for ADO.NET is the synchronization provider for synchronizing across databases using ADO.NET. ADO.NET Datasets are synchronized between the source and the destination, which are then persisted to a database server. It can also support data sources other than a relational database, like an XML database or web service as long as a proxy is provided to abstract the data source and a data provider is available for the proxy.

The Sync Services for ADO.NET provider is intended for use in offline applications, where data from the central database is cached locally. The application works against the cached data, and the changes are uploaded in a batch. In addition, the provider can also be used for collaborative applications, where each application will work against its local dataset, which will be synchronized periodically in a peer-to-peer manner with the other participants. Locally, the datasets can be stored either by using the SQL Server Compact database or any other database server supporting ADO.NET. Sync Services for ADO.NET allows incremental change tracking, which allows only the changes to be replicated rather than replicating the entire copy.

Sync Services for File Systems

The Sync Services for File Systems provider is used to synchronize two file system locations, which can either be local folders or network shares. In addition to mirroring new files, changes to existing files are also synchronized. Changes to files are detected by using timestamps, or optionally, by hashing the file contents. Conflicting changes to the same file are detected and can be set to be automatically resolved. For conflicting updates to a same file, the newer edit will be kept. If a file is deleted in one replica but updated in another, the update will take precedence over the delete. If two files with different content are created with the same name across two replicas, during the sync operation, the one created later will be persisted. If a rename operation caused the files to get the same name, both are retained by renaming one of them. Any deletes can be configured to move the file to the Recycle Bin, so that it can be recovered if necessary. The Sync Services for File Systems provider also provides a preview mode which enumerates the actions that will be taken for a sync operation, without actually performing the operations, with a view to letting the users review the changes that will be made. The synchronization is performed in a peer-to-peer manner. Neither Sync Framework or the Sync Services for File Systems provider perform any authentication before accessing the files; so any authentication is the job of the application using the Sync Framework API. The files are transferred without encryption. To use encryption in transit, custom providers that uses an encrypted TCP connection needs to be used. The Sync Services for File Systems provider also supports static filters to exclude files based on wildcards or attributes. In the first CTP release, however, the Sync Services for File Systems provider does not sync either NTFS security descriptors or Alternate Data Streams.

Sync Services for FeedSync

The Sync Services for FeedSync provider can be used to help synchronize replicas by creating a FeedSync enabled feed, either in RSS or ATOM formats, which can then be subscribed to by interested parties. The provider can also be used to extract items from a FeedSync feed and merge the changes back to the data store. Sync Services for FeedSync uses another provider to connect to the data store.

Sync Services for FeedSync provides services that can be used to help synchronize the data of a replica with RSS and Atom feeds. (A replica is a particular repository of information to be synchronized.) By using the FeedSync producer service, a synchronization application can work with a synchronization provider to create a list of items from a replica and put them in an RSS or Atom XML stream. These items can then be published to interested subscribers. Similarly, the FeedSync consumer service helps a synchronization application take an input RSS or Atom XML stream, extract items from it, and then use a synchronization provider to apply only the appropriate changes to a replica. Because Sync Framework underlies the exchange of feed items, two feeds can be cross-subscribed and easily synchronized with one another as peers in a synchronization community. (A synchronization community is a set of replicas that keep their data synchronized with each other.)

Licensing

Microsoft Sync Framework is free on Windows and Windows Mobile devices. Support for other platforms is available through commercial licensing and porting kits. [2]

See also

Notes

  1. "Microsoft: Sync Framework isn't Google Gears". 2007-11-06. Archived from the original on 2015-06-19. Retrieved 2015-06-19.
  2. "Microsoft Sync Framework (MSF) – FAQ" . Retrieved 24 July 2016.

Related Research Articles

In computing, Microsoft's ActiveX Data Objects (ADO) comprises a set of Component Object Model (COM) objects for accessing data sources. A part of MDAC, it provides a middleware layer between programming languages and OLE DB. ADO allows a developer to write programs that access data without knowing how the database is implemented; developers must be aware of the database for connection only. No knowledge of SQL is required to access a database when using ADO, although one can use ADO to execute SQL commands directly.

WinFS was the code name for a canceled data storage and management system project based on relational databases, developed by Microsoft and first demonstrated in 2003. It was intended as an advanced storage subsystem for the Microsoft Windows operating system, designed for persistence and management of structured, semi-structured and unstructured data.

ADO.NET is a data access technology from the Microsoft .NET Framework that provides communication between relational and non-relational systems through a common set of components. ADO.NET is a set of computer software components that programmers can use to access data and data services from a database. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational data sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

<span class="mw-page-title-main">Microsoft Data Access Components</span> Framework

Microsoft Data Access Components is a framework of interrelated Microsoft technologies that allows programmers a uniform and comprehensive way of developing applications that can access almost any data store. Its components include: ActiveX Data Objects (ADO), OLE DB, and Open Database Connectivity (ODBC). There have been several deprecated components as well, such as the Jet Database Engine, MSDASQL, and Remote Data Services (RDS). Some components have also become obsolete, such as the former Data Access Objects API and Remote Data Objects.

Microsoft SQL Server Analysis Services (SSAS) is an online analytical processing (OLAP) and data mining tool in Microsoft SQL Server. SSAS is used as a tool by organizations to analyze and make sense of information possibly spread out across multiple databases, or in disparate tables or files. Microsoft has included a number of services in SQL Server related to business intelligence and data warehousing. These services include Integration Services, Reporting Services and Analysis Services. Analysis Services includes a group of OLAP and data mining capabilities and comes in two flavors multidimensional and tabular, where the difference between the two is how the data is presented. In a tabular model, the information is arranged in two-dimensional tables which can thus be more readable for a human. A multidimensional model can contain information with many degrees of freedom, and must be unfolded to increase readability by a human.

RSS Bandit is an open source RSS/Atom aggregator based on the Microsoft .NET framework. It was originally released as a code sample in a series of articles the Extreme XML column written by Dare Obasanjo on MSDN in 2003. The code samples were developed into an open source project. It is currently hosted on GitHub and the primary contributors are Dare Obasanjo and Torsten Rendelmann.

FeedSync for Atom and RSS, previously Simple Sharing Extensions, are extensions to RSS and Atom feed formats designed to enable the bi-directional synchronization of information by using a variety of data sources. Initially developed by Ray Ozzie, Chief Software Architect at Microsoft, it is now maintained by Jack Ozzie, George Moromisato, Matt Augustine, Paresh Suthar and Steven Lees. Dave Winer, the designer of the UserLand Software RSS specification variants, has given input for the specifications.

Compared with previous versions of Microsoft Windows, features new to Windows Vista are very numerous, covering most aspects of the operating system, including additional management features, new aspects of security and safety, new I/O technologies, new networking features, and new technical features. Windows Vista also removed some others.

<span class="mw-page-title-main">Windows Live Mesh</span>

Windows Live Mesh is a discontinued free-to-use Internet-based file synchronization application by Microsoft designed to allow files and folders between two or more computers to be in sync with each other on Windows and Mac OS X computers or the Web via SkyDrive. Windows Live Mesh also enabled remote desktop access via the Internet.

<span class="mw-page-title-main">Conduit (software)</span> Synchronization program for GNOME

Conduit is an open-source synchronization program for GNOME. It allows the user to synchronize information to and from various destinations. For instance, it can be used to synchronise photos on the users computer with various websites. Other types of information may be synchronized, such as files, folders, RSS feeds, emails, notes, contacts, calendars, and tasks. The program uses a drag-and-drop interface to give a visual representation of what is going to be done.

Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework.

Microsoft SQL Server Compact is a discontinued relational database produced by Microsoft for applications that run on mobile devices and desktops. Prior to the introduction of the desktop platform, it was known as SQL Server for Windows CE and SQL Server Mobile Edition.

Azure DevOps Server, formerly known as Team Foundation Server (TFS) and Visual Studio Team System (VSTS), is a Microsoft product that provides version control, reporting, requirements management, project management, automated builds, testing and release management capabilities. It covers the entire application lifecycle and enables DevOps capabilities. Azure DevOps can be used as a back-end to numerous integrated development environments (IDEs) but is tailored for Microsoft Visual Studio and Eclipse on all platforms.

<span class="mw-page-title-main">SharePoint</span> Web application platform

SharePoint is a web-based collaborative platform that integrates natively with Microsoft 365. Launched in 2001, SharePoint is primarily sold as a document management and storage system, although it is also used for sharing information through an intranet, implementing internal applications, and for implementing business processes.

Microsoft SQL Server is a proprietary relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network. Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users.

Microsoft Search Server (MSS) was an enterprise search platform from Microsoft, based on the search capabilities of Microsoft Office SharePoint Server. MSS shared its architectural underpinnings with the Windows Search platform for both the querying engine and the indexer. Microsoft Search Server was once known as SharePoint Server for Search.

<span class="mw-page-title-main">Windows Live Mail</span> Email client, electronic calendar and newsreader, developed by Microsoft

Windows Live Mail is a discontinued freeware email client from Microsoft. It was the successor to Windows Mail in Windows Vista, which was the successor to Outlook Express in Windows XP and Windows 98. Windows Live Mail is designed to run on Windows 7 and Windows Server 2008 R2, but is also compatible with Windows 8 and Windows 10, even though Microsoft bundles a new email client, named Windows Mail, with the latter. In addition to email, Windows Live Mail also features a calendar, an RSS feed reader, and a Usenet newsreader.

<span class="mw-page-title-main">Windows Search</span> Desktop search platform by Microsoft

Windows Search is a content index desktop search platform by Microsoft introduced in Windows Vista as a replacement for both the previous Indexing Service of Windows 2000 and the optional MSN Desktop Search for Windows XP and Windows Server 2003, designed to facilitate local and remote queries for files and non-file items in compatible applications including Windows Explorer. It was developed after the postponement of WinFS and introduced to Windows constituents originally touted as benefits of that platform.

This is a comparison of online backup services.

<span class="mw-page-title-main">RSS Guard</span> Free and open-source news aggregator

RSS Guard is a free and open-source news aggregator for web feeds and podcasts. It is written in C++ and uses Qt, which allows it to fit with the look and feel of different operating systems while remaining cross-platform. It includes a file downloader, advanced network proxy configuration, and supports external media viewing tools.