As small and medium-sized business (SMB) customers struggle to embrace mobility, solutions providers may want to evaluate the Microsoft Sync Framework: a free, open source tool that synchronizes mobile workers' application data across platforms.
As more mobile workers access enterprise data from a variety of devices, they expect on-demand fast connections, similar to what they might find on their smart phone applications. Accessing the data through virtual private networks and Web-based applications requires a continuous network connection and is affected by slow data access speeds, server overload and the potential for a single point of failure.
In some cases, a better approach might be to deploy occasionally connected applications (OCAs) on the mobile devices. With these OCAs, data is stored locally and then periodically synchronized with a central SQL Server or SQL Azure database. That way, users no longer need a constant connection to the network to access their data. The synchronization required to make this feasible is complex, but the Microsoft Sync Framework can make it all work.
Microsoft Sync Framework tutorial
The Microsoft Sync Framework is a synchronization tool that solutions providers can implement for customers, enabling information sharing across a variety of platforms, devices, services and applications. By using the Sync Framework, you can build a synchronization infrastructure that facilitates collaboration and offline capabilities among your mobile workers, while maintaining the integrity of your SQL Server or SQL Azure central data stores.
Prior to the current version of the Sync Framework 4.0, the framework required devices that ran Windows systems with the Sync Framework runtime installed. Now the framework supports synchronization on any device that can cache and store data. Solutions providers can enable customer's mobile employees to work offline when using their smartphones, tablets and laptops, and make it possible for them to regularly synchronize their data to the central data store and with each other.
The Sync Framework follows a common synchronization metadata model, which provides for flexible metadata modeling without being constrained by data types, data store types or the protocols used to transfer that data. In this sense, the framework provides an agnostic environment for handling data from all sorts of devices, yet it includes the components necessary to easily set up synchronization services and expose data from SQL Server or SQL Azure. Because the synchronization logic runs on the service side, you can easily synchronize data from a variety of sources.
Microsoft Sync Framework components
A Sync Framework environment is made up of a number of components that facilitate data synchronization across a wide range of devices.
This provides a conceptual overview of this environment and demonstrates how the components fit together. The framework is, of course, more complex than what's shown here, but the figure should at least provide you with a starting point in understanding how the framework operates.
At the core of the Microsoft Sync Framework is the sync runtime, which drives the synchronization process. The runtime contains the metadata services needed to track changes and resolve conflicts. In addition, the runtime communicates status, conflict and error information to the appropriate application.
The runtime also includes a synchronization agent that can synchronize endpoints when requested. The Sync Framework abstracts endpoints through sync providers that expose the endpoint data and metadata to the framework. The providers make it possible to work with many types of data and data stores, including SQL Server and SQL Azure.
Each provider is specific to the type of data being synchronized. The Sync Framework includes a number of built-in providers that can connect to database systems, files and folders, and Web feeds and services. In addition, the framework includes the APIs necessary to create custom providers for those endpoints not supported by the built-in providers.
The orchestrator works in conjunction with the runtime and providers to manage the synchronization sessions between the providers. The orchestrator also communicates with the sync application, a Web service that calls the framework's synchronization methods, responds to events related to the synchronization process and performs other application-related tasks. The sync application can also communicate directly with the providers in order to configure them.
The other components of the Microsoft Sync Framework topology are the various nodes (also referred to as replicas) that connect to the framework via the providers. In the diagram, the nodes include the two endpoint mobile devices configured with the OCAs and the SQL Server/SQL Azure data store.
Regardless of the node type, each one includes a data store that contains the data being synchronized among the various nodes. Each node also includes a metadata store that the Microsoft Sync Framework uses to determine which changes to retrieve from a node's data store and which to apply to that store. Because the framework is based on this metadata approach, data from any one node can be synced with the data in any other node.
The Microsoft Sync Framework topology
Because the Microsoft Sync Framework is data type and data store agnostic, the topology can take many forms and support numerous scenarios. It can even support devices such as thumb drives and SD cards. Data can also be retrieved from RSS feeds and Web services and integrated into the sync architecture. In fact, the Microsft Sync Framework doesn't even require a SQL Azure or SQL Server database.
Despite the Sync Framework's versatility, the service is not without its issues. For example, if you want to support bidirectional syncing, you could run into problems if you use auto-incremented integers as your primary keys and those values are being generated in more than one location. There are also several known issues with the SyncSvcUtil tool, which is used for provisioning and code generation. In addition, entities configured with the DATETIME and DATETIMEOFFSET data types can lose precision when their data is stored in isolated storage. You should also be aware that you can't add data to or delete data from the local store when a synchronization session is active. For all these reasons, if you plan to implement the Sync Framework, be sure to check Microsoft's website for the latest information on the Sync Framework so you're up-to-date on currently known issues.
As the mobile world continues to expand, so does the need to manage data across multiple platforms and devices, and the Microsoft Sync Framework can provide a valuable tool for solutions providers needing to synchronize data between a central data store and multiple mobile devices. Now that the Sync Framework is a free, open-source product, solutions providers and customers have more access to this tool.
About the author
Robert Sheldon is a technical consultant and freelance technology writer. He's authored numerous books, articles and training material related to Windows, databases, business intelligence and other areas of technology. He's also published the novel Dancing the River Lightly and the step-by-step guide Ebook Now, and has recently begun working on the 5-Spot ebook travel series.
Dig deeper on Database Management Products and Solutions