SlideShare a Scribd company logo
Microsoft Sync
Framework (part 2)
A COMPREHENSIVE SYNCHRONIZATION PLATFORM THAT ENABLES COLLABORATION AND OFFLINE ACCESS FOR APPLICATIONS,
SERVICES, AND DEVICES WITH SUPPORT FOR ANY DATA TYPE, ANY DATA STORE, ANY TRANSFER PROTOCOL, AND ANY NETWORK
TOPOLOGY
by Sergij Garntsarik
Synchronization
The ability to support mobile and remote workers is becoming more and more important for organizations
every day. It is critical that organizations ensure users have access to the same information they have
when they are in the office. In most cases, these workers will have some sort of laptop, office desktop,
Smartphone, or PDA. From these devices, users may be able to access their data directly through VPN
connections, Web servers, or some other connectivity method into the corporate networks as seen below.
2
Disadvantages
1. Network Requirements: In order to allow users to access their information, the remote
device needs to have a constant connection to the corporate network while accessing
their data. For some workers, such as those who are working from home, this may not be a
problem. For others, such as sales reps who are constantly on the move, this may be more
difficult. For example, if that sales rep were visiting a customer and was unable to access
inventory data because of a lack of network connectivity, it would be very difficult for this
user to effectively do their job.
2. Data Access Speeds: In a typical client/server corporate environment, users have high
speed networks that allow them quick access to information. Remote workers, however, are
typically connected over slow, unreliable wired or wireless networks. With this solution, every
piece of data this user needed would need to be downloaded every time it is requested
because there is no way to persist the data on the device. For example, if a sales rep is
required to download his product list every time he opens his application, he will quickly
become frustrated with the time lag required to populate his application with information.
3. Single Point of Failure: With this type of solution, all users are reliant on a single server. If that
database becomes unavailable due to planned server downtime or from server failures, all
of the remote workers will be disconnected from their data.
4. Server Scalability: As more workers work remotely, the performance of the corporate servers
will be affected, leading to a need to add additional hardware.
3
Occasionally Connected
Application (OCA)
OCA allows a remote worker to continue to access their data, but unlike the
previous scenario where the user accessed the corporate database directly, the
information the worker requires is stored locally on the user’s device
4
SQL Server 2008 Change Tracking
The concept behind change tracking is that an administrator marks certain
tables to be monitored for changes. From that point SQL Server 2008 keeps
tracks of any inserts, updates, or deletes that are made
✎ No schema changes are required to be able to track changes.
✎ Triggers are not required for tracking changes, which means that tracking
changes has far less of an impact on the server.
✎ All of the logic for tracking changes is internal to the SQL Server engine and as
such reduces the complexity for setting up this type of system.
✎ Data consistency issues associated with long running transactions are no
longer an issue.
✎ Includes integrated database administration feature such as Dynamic
Management Views and Security.
5
Conflicts
Types of Conflicts and Errors
Sync Framework detects the following types of conflicts. These are
defined in the ConflictType enumeration:
✎ ClientInsertServerInsert conflict occurs when the client and
server both insert a row with the same primary key. This type of
conflict is also known as a primary key collision.
✎ ClientUpdateServerUpdate conflict occurs when the client and
server change the same row. This is the most common type of
conflict.
✎ ClientUpdateServerDelete conflict occurs when the client
updates a row and the server deletes the same row.
✎ ClientDeleteServerUpdate conflict occurs when the client
deletes a row and the server updates the same row.
✎ ErrorsOccurred conflict occurs when an error prevents a row
from being applied.
6
Conflict and Error Resolution
The SqlCeClientSyncProvider also includes a ConflictResolver property that you can use to resolve
conflicts on the client. For each type of conflict, you can set a value from the ResolveAction
enumeration:
✎ ClientWins: equivalent to setting an ApplyAction of Continue.
✎ ServerWins: equivalent to setting an ApplyAction of RetryWithForceWrite.
✎ FireEvent: fire the ApplyChangeFailed event, the default, and then handle the event.
7
Synchronizing Files
SYNCHRONIZE FILES AND FOLDERS IN NTFS, FAT, AND SMB FILE SYSTEMS. THE
DIRECTORIES TO SYNCHRONIZE CAN BE LOCAL OR REMOTE AND DO NOT
HAVE TO BE OF THE SAME FILE SYSTEM TYPE
8
Benefits of Using Sync Framework
1. An extensible model that lets you integrate multiple data sources into a
synchronization ecosystem.
2. A managed API for all components, and a native API for select components.
3. Conflict handling for automatic and custom resolution schemes.
4. Filters that let you synchronize a subset of data, such as only those files that contain
images.
5. A compact and efficient metadata model that enables synchronization for virtually
any participant, without significant changes to the data store:
✎ Any data store (applications, services, and devices)
✎ Any data type
✎ Any protocol
✎ Any network configuration (Easily recover from network interruptions. Reduce
network traffic by efficiently selecting changes to synchronize)
9
Sync Framework Architecture
Elements that are written by the
developer.
✎ The application calls synchronization
methods, responds to events, and
handles other tasks based on
application requirements.
✎ The data store could be a file
system, a relational database, a flat
file contacts store, or any other data
store that needs to be synchronized.
✎ The data transfer protocol
determines how data changes are
transmitted between two providers.
Elements that are provided by Sync
Framework.
✎ Depending on whether native code or
managed code is used, the application
communicates with a synchronization
session or a synchronization orchestrator,
which then communicates with each
synchronization provider.
✎ The synchronization runtime drives the
synchronization process and
communicates status, conflicts, and
errors to the client application.
Elements that are either written by the developer or
provided by Sync Framework, depending on the
scenario.
✎ The provider is specific to the type of data that is
being synchronized. In some situations, an
application requires a custom provider that the
developer must write. Sync Framework provides a
number of APIs to make this process more
straightforward.
✎ How metadata is stored and worked with depends
on which provider is used. For example, providers
for databases typically store metadata in tracking
tables in the same database as the data store. For
custom providers, you can create a metadata store
or use a service that is included with Sync
Framework.
10
Controlling Which Files Are
Synchronized
Excluded and Unsupported File and Folder Types
✎ Thumbs.db when the hidden and system attributes are set.
✎ Desktop.ini when the hidden and system attributes are set.
✎ The metadata file that was specified when the provider was initialized.
✎ A file that has the offline or device attribute set.
✎ A folder that has the reparse point attribute set.
Static Filters ( FileSyncScopeFilter )
Static filters can be set to exclude files by name (including wildcard names) and by
attribute. Static filters can also be set to exclude the contents of whole subfolders, but
wildcards are not supported for subfolders
Skipping Files (SkipChange property)
Files can be dynamically skipped during synchronization by handling an event
raised by the provider. This event occurs during change application
11
Understanding File Synchronization
To synchronize files between two folders, an application completes the following
basic steps:
12
Setting Synchronization Options
Performing Change Detection
13
Specifying a Static Filter
Handling Conflicts
14
Synchronizing Two Replicas
After options and filters are set, the application synchronizes the two replicas by
instantiating a SyncOrchestrator, and calling the Synchronize method
SyncDirectionOrder Enumeration
UploadAndDownload Upload followed by download.
DownloadAndUpload Download followed by upload.
Upload Upload only.
Download Download only.
15
Custom Synchronization Providers
SYNC FRAMEWORK INCLUDES PROVIDERS FOR SEVERAL STANDARD
SYNCHRONIZATION SCENARIOS, BUT IN SOME SITUATIONS A CUSTOM
PROVIDER IS NECESSARY
16
Sync Framework Architecture
Elements that are written by the developer.
✎ The application starts synchronization,
responds to events, and handles other
tasks based on application
requirements.
✎ The provider manages the metadata
for a replica and works with Sync
Framework to enumerate changes and
detect conflicts. The provider also
works with the data store of a replica to
send item data when the provider is
acting as the source provider, and to
apply changes when the provider is
acting as the destination provider.
Elements that are provided by Sync
Framework.
✎ Depending on whether managed or
unmanaged code is used, the application
communicates with a synchronization
orchestrator (SyncOrchestrator) or a
synchronization session (ISyncSession),
which then communicates with each
synchronization provider, drives the
synchronization process, and
communicates status, conflicts, and errors
to the client application.
✎ The synchronization runtime helps the
providers perform common
synchronization tasks, such as metadata
management, conflict detection, and
change application.
Elements that are either written by the
developer or provided by Sync Framework,
depending on the scenario.
✎ The metadata store contains the
metadata that Sync Framework uses to
determine which changes each provider
should select from and apply to the data
store that it services. The metadata store
can be separate from the data store (such
a separate file or database), or integrated
into the store (such an extra table in a
database). Typically, the synchronization
provider manages the metadata that is
required for synchronization.
17
Understanding Sync Framework
Participant Types
Sync Framework can be used to synchronize data among participants of varying
functionality. A participant is a device or service that can synchronize with other systems
that are running Sync Framework.
Sync Framework supports the following types of participants:
✎ Full participant
✎ Proxy participant
✎ Partial participant
✎ Simple participant
18
Partial Participant
A partial participant can store synchronization metadata but cannot process it. A partial
participant relies on several full participants to host the runtime and start synchronization.
Data can flow through these participants because they can carry the multimaster
synchronization metadata and communicate this metadata with any other full participant.
Partial participants cannot take part in peer-to-peer scenarios because of their inability to
process the metadata or host the runtime.
Full Participant
A full participant locally hosts the runtime and stores metadata. Full participants
can take part in peer-to-peer synchronization scenarios because both participants
can start synchronization.
19
Simple Participant
A simple participant does not store metadata, cannot house the runtime, and might not
have change tracking. Instead, a simple participant relies on a single full participant to
do everything with regard to enumerating changes, applying changes, and
manipulating and storing the metadata. Because a simple participant cannot store
metadata, it can only act as a leaf node that is partnered with a single full participant
that transfers data to and from any other participants.
Proxy Participant
A proxy participant starts synchronization for a remote provider by handling calls locally
and forwarding them to the remote provider, such as a database that is stored on a
server.
Security Note
Sync Framework does not provide authentication or encryption between the
proxy provider and the remote provider. To help prevent unauthorized access
or tampering, the communication channel between the proxy provider and
the remote provider must be secured by using an appropriate mutual
authentication and encryption mechanism, such as Secure Sockets Layer (SSL).
20
The main task when you are
developing a provider is to
implement the
KnowledgeSyncProvider
abstract class (which inherits
from the SyncProvider abstract
class) and the
IChangeDataRetriever and
INotifyingChangeApplierTarget
interfaces.
21
Code samples
22
Questions
23

More Related Content

PPSX
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
PDF
installation and configuration of informatica server
DOC
Clustering overview2
PDF
Peoplesoft PIA architecture
PPTX
PPT
Tech Talk Oct 2008 Upgrade Migrate
PPT
Mulesoft Filters
PDF
Hyperion LCM Utility
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
installation and configuration of informatica server
Clustering overview2
Peoplesoft PIA architecture
Tech Talk Oct 2008 Upgrade Migrate
Mulesoft Filters
Hyperion LCM Utility

What's hot (20)

PPTX
Client server architecture
PPTX
Service oriented online architecture using mule
PPT
Client Server Computing : unit 1
PPT
Mule esb-connectors
PDF
Database operations
PDF
oracle
PPTX
Dot Net performance monitoring
PDF
Sql server replication step by step
PPT
Web Server Hardware and Software
PPTX
People soft overview
PPTX
Case Management by EMC - xCP Platform
TXT
armür magnet
PDF
Siebel deployment
PDF
Business Analytics System
PDF
Testing web applications
DOCX
Introduction to the client server computing By Attaullah Hazrat
PDF
Microsoft exchange-server-2013-installation
PPTX
Client computing evolution ppt11
DOCX
Data Warehousing Practical for T.Y.I.T.
Client server architecture
Service oriented online architecture using mule
Client Server Computing : unit 1
Mule esb-connectors
Database operations
oracle
Dot Net performance monitoring
Sql server replication step by step
Web Server Hardware and Software
People soft overview
Case Management by EMC - xCP Platform
armür magnet
Siebel deployment
Business Analytics System
Testing web applications
Introduction to the client server computing By Attaullah Hazrat
Microsoft exchange-server-2013-installation
Client computing evolution ppt11
Data Warehousing Practical for T.Y.I.T.
Ad

Similar to Microsoft Sync Framework (part 2) ABTO Software Lecture Garntsarik (20)

PPT
Microsoft Sync Framework
PPTX
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
PPTX
Syn framework 4.0 and sql server
PPTX
Occasionally Connected Systems
PPT
Defy Occassionally Connected Challenges With Smart Client Applications
PDF
The Syncables Framework
PPT
Planning for Synchronization with Browser-Local Databases
PPT
Introduction To .Net Compact Framework and SQL Server CE Development
PPTX
Webinar: Implementation of 10 Integration Patterns on iPaaS Platform
PPTX
SYNCHRONIZATION
PDF
Designing For Occasionally Connected Apps Slideshare
PDF
Huddle Sync - Intelligent File Sync
PPTX
AppSync.org: open-source patterns and code for data synchronization in mobile...
PPTX
Isas _Q3 _Soft_Topic3_enterprise_application_architecture
PDF
Net App Unified Storage Architecture
PDF
Net App Unified Storage Architecture
PDF
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
PPTX
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
PDF
IT Breakafst for FIN 28 sierpnia 2014, Warszawa, Pałac Sobańskich
PDF
Novell mobile collaboration
Microsoft Sync Framework
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
Syn framework 4.0 and sql server
Occasionally Connected Systems
Defy Occassionally Connected Challenges With Smart Client Applications
The Syncables Framework
Planning for Synchronization with Browser-Local Databases
Introduction To .Net Compact Framework and SQL Server CE Development
Webinar: Implementation of 10 Integration Patterns on iPaaS Platform
SYNCHRONIZATION
Designing For Occasionally Connected Apps Slideshare
Huddle Sync - Intelligent File Sync
AppSync.org: open-source patterns and code for data synchronization in mobile...
Isas _Q3 _Soft_Topic3_enterprise_application_architecture
Net App Unified Storage Architecture
Net App Unified Storage Architecture
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
IT Breakafst for FIN 28 sierpnia 2014, Warszawa, Pałac Sobańskich
Novell mobile collaboration
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
sap open course for s4hana steps from ECC to s4
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Assigned Numbers - 2025 - Bluetooth® Document
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence
cuic standard and advanced reporting.pdf

Microsoft Sync Framework (part 2) ABTO Software Lecture Garntsarik

  • 1. Microsoft Sync Framework (part 2) A COMPREHENSIVE SYNCHRONIZATION PLATFORM THAT ENABLES COLLABORATION AND OFFLINE ACCESS FOR APPLICATIONS, SERVICES, AND DEVICES WITH SUPPORT FOR ANY DATA TYPE, ANY DATA STORE, ANY TRANSFER PROTOCOL, AND ANY NETWORK TOPOLOGY by Sergij Garntsarik
  • 2. Synchronization The ability to support mobile and remote workers is becoming more and more important for organizations every day. It is critical that organizations ensure users have access to the same information they have when they are in the office. In most cases, these workers will have some sort of laptop, office desktop, Smartphone, or PDA. From these devices, users may be able to access their data directly through VPN connections, Web servers, or some other connectivity method into the corporate networks as seen below. 2
  • 3. Disadvantages 1. Network Requirements: In order to allow users to access their information, the remote device needs to have a constant connection to the corporate network while accessing their data. For some workers, such as those who are working from home, this may not be a problem. For others, such as sales reps who are constantly on the move, this may be more difficult. For example, if that sales rep were visiting a customer and was unable to access inventory data because of a lack of network connectivity, it would be very difficult for this user to effectively do their job. 2. Data Access Speeds: In a typical client/server corporate environment, users have high speed networks that allow them quick access to information. Remote workers, however, are typically connected over slow, unreliable wired or wireless networks. With this solution, every piece of data this user needed would need to be downloaded every time it is requested because there is no way to persist the data on the device. For example, if a sales rep is required to download his product list every time he opens his application, he will quickly become frustrated with the time lag required to populate his application with information. 3. Single Point of Failure: With this type of solution, all users are reliant on a single server. If that database becomes unavailable due to planned server downtime or from server failures, all of the remote workers will be disconnected from their data. 4. Server Scalability: As more workers work remotely, the performance of the corporate servers will be affected, leading to a need to add additional hardware. 3
  • 4. Occasionally Connected Application (OCA) OCA allows a remote worker to continue to access their data, but unlike the previous scenario where the user accessed the corporate database directly, the information the worker requires is stored locally on the user’s device 4
  • 5. SQL Server 2008 Change Tracking The concept behind change tracking is that an administrator marks certain tables to be monitored for changes. From that point SQL Server 2008 keeps tracks of any inserts, updates, or deletes that are made ✎ No schema changes are required to be able to track changes. ✎ Triggers are not required for tracking changes, which means that tracking changes has far less of an impact on the server. ✎ All of the logic for tracking changes is internal to the SQL Server engine and as such reduces the complexity for setting up this type of system. ✎ Data consistency issues associated with long running transactions are no longer an issue. ✎ Includes integrated database administration feature such as Dynamic Management Views and Security. 5
  • 6. Conflicts Types of Conflicts and Errors Sync Framework detects the following types of conflicts. These are defined in the ConflictType enumeration: ✎ ClientInsertServerInsert conflict occurs when the client and server both insert a row with the same primary key. This type of conflict is also known as a primary key collision. ✎ ClientUpdateServerUpdate conflict occurs when the client and server change the same row. This is the most common type of conflict. ✎ ClientUpdateServerDelete conflict occurs when the client updates a row and the server deletes the same row. ✎ ClientDeleteServerUpdate conflict occurs when the client deletes a row and the server updates the same row. ✎ ErrorsOccurred conflict occurs when an error prevents a row from being applied. 6
  • 7. Conflict and Error Resolution The SqlCeClientSyncProvider also includes a ConflictResolver property that you can use to resolve conflicts on the client. For each type of conflict, you can set a value from the ResolveAction enumeration: ✎ ClientWins: equivalent to setting an ApplyAction of Continue. ✎ ServerWins: equivalent to setting an ApplyAction of RetryWithForceWrite. ✎ FireEvent: fire the ApplyChangeFailed event, the default, and then handle the event. 7
  • 8. Synchronizing Files SYNCHRONIZE FILES AND FOLDERS IN NTFS, FAT, AND SMB FILE SYSTEMS. THE DIRECTORIES TO SYNCHRONIZE CAN BE LOCAL OR REMOTE AND DO NOT HAVE TO BE OF THE SAME FILE SYSTEM TYPE 8
  • 9. Benefits of Using Sync Framework 1. An extensible model that lets you integrate multiple data sources into a synchronization ecosystem. 2. A managed API for all components, and a native API for select components. 3. Conflict handling for automatic and custom resolution schemes. 4. Filters that let you synchronize a subset of data, such as only those files that contain images. 5. A compact and efficient metadata model that enables synchronization for virtually any participant, without significant changes to the data store: ✎ Any data store (applications, services, and devices) ✎ Any data type ✎ Any protocol ✎ Any network configuration (Easily recover from network interruptions. Reduce network traffic by efficiently selecting changes to synchronize) 9
  • 10. Sync Framework Architecture Elements that are written by the developer. ✎ The application calls synchronization methods, responds to events, and handles other tasks based on application requirements. ✎ The data store could be a file system, a relational database, a flat file contacts store, or any other data store that needs to be synchronized. ✎ The data transfer protocol determines how data changes are transmitted between two providers. Elements that are provided by Sync Framework. ✎ Depending on whether native code or managed code is used, the application communicates with a synchronization session or a synchronization orchestrator, which then communicates with each synchronization provider. ✎ The synchronization runtime drives the synchronization process and communicates status, conflicts, and errors to the client application. Elements that are either written by the developer or provided by Sync Framework, depending on the scenario. ✎ The provider is specific to the type of data that is being synchronized. In some situations, an application requires a custom provider that the developer must write. Sync Framework provides a number of APIs to make this process more straightforward. ✎ How metadata is stored and worked with depends on which provider is used. For example, providers for databases typically store metadata in tracking tables in the same database as the data store. For custom providers, you can create a metadata store or use a service that is included with Sync Framework. 10
  • 11. Controlling Which Files Are Synchronized Excluded and Unsupported File and Folder Types ✎ Thumbs.db when the hidden and system attributes are set. ✎ Desktop.ini when the hidden and system attributes are set. ✎ The metadata file that was specified when the provider was initialized. ✎ A file that has the offline or device attribute set. ✎ A folder that has the reparse point attribute set. Static Filters ( FileSyncScopeFilter ) Static filters can be set to exclude files by name (including wildcard names) and by attribute. Static filters can also be set to exclude the contents of whole subfolders, but wildcards are not supported for subfolders Skipping Files (SkipChange property) Files can be dynamically skipped during synchronization by handling an event raised by the provider. This event occurs during change application 11
  • 12. Understanding File Synchronization To synchronize files between two folders, an application completes the following basic steps: 12
  • 14. Specifying a Static Filter Handling Conflicts 14
  • 15. Synchronizing Two Replicas After options and filters are set, the application synchronizes the two replicas by instantiating a SyncOrchestrator, and calling the Synchronize method SyncDirectionOrder Enumeration UploadAndDownload Upload followed by download. DownloadAndUpload Download followed by upload. Upload Upload only. Download Download only. 15
  • 16. Custom Synchronization Providers SYNC FRAMEWORK INCLUDES PROVIDERS FOR SEVERAL STANDARD SYNCHRONIZATION SCENARIOS, BUT IN SOME SITUATIONS A CUSTOM PROVIDER IS NECESSARY 16
  • 17. Sync Framework Architecture Elements that are written by the developer. ✎ The application starts synchronization, responds to events, and handles other tasks based on application requirements. ✎ The provider manages the metadata for a replica and works with Sync Framework to enumerate changes and detect conflicts. The provider also works with the data store of a replica to send item data when the provider is acting as the source provider, and to apply changes when the provider is acting as the destination provider. Elements that are provided by Sync Framework. ✎ Depending on whether managed or unmanaged code is used, the application communicates with a synchronization orchestrator (SyncOrchestrator) or a synchronization session (ISyncSession), which then communicates with each synchronization provider, drives the synchronization process, and communicates status, conflicts, and errors to the client application. ✎ The synchronization runtime helps the providers perform common synchronization tasks, such as metadata management, conflict detection, and change application. Elements that are either written by the developer or provided by Sync Framework, depending on the scenario. ✎ The metadata store contains the metadata that Sync Framework uses to determine which changes each provider should select from and apply to the data store that it services. The metadata store can be separate from the data store (such a separate file or database), or integrated into the store (such an extra table in a database). Typically, the synchronization provider manages the metadata that is required for synchronization. 17
  • 18. Understanding Sync Framework Participant Types Sync Framework can be used to synchronize data among participants of varying functionality. A participant is a device or service that can synchronize with other systems that are running Sync Framework. Sync Framework supports the following types of participants: ✎ Full participant ✎ Proxy participant ✎ Partial participant ✎ Simple participant 18
  • 19. Partial Participant A partial participant can store synchronization metadata but cannot process it. A partial participant relies on several full participants to host the runtime and start synchronization. Data can flow through these participants because they can carry the multimaster synchronization metadata and communicate this metadata with any other full participant. Partial participants cannot take part in peer-to-peer scenarios because of their inability to process the metadata or host the runtime. Full Participant A full participant locally hosts the runtime and stores metadata. Full participants can take part in peer-to-peer synchronization scenarios because both participants can start synchronization. 19
  • 20. Simple Participant A simple participant does not store metadata, cannot house the runtime, and might not have change tracking. Instead, a simple participant relies on a single full participant to do everything with regard to enumerating changes, applying changes, and manipulating and storing the metadata. Because a simple participant cannot store metadata, it can only act as a leaf node that is partnered with a single full participant that transfers data to and from any other participants. Proxy Participant A proxy participant starts synchronization for a remote provider by handling calls locally and forwarding them to the remote provider, such as a database that is stored on a server. Security Note Sync Framework does not provide authentication or encryption between the proxy provider and the remote provider. To help prevent unauthorized access or tampering, the communication channel between the proxy provider and the remote provider must be secured by using an appropriate mutual authentication and encryption mechanism, such as Secure Sockets Layer (SSL). 20
  • 21. The main task when you are developing a provider is to implement the KnowledgeSyncProvider abstract class (which inherits from the SyncProvider abstract class) and the IChangeDataRetriever and INotifyingChangeApplierTarget interfaces. 21

Editor's Notes

  • #3: The ability to support mobile and remote workers is becoming more and more important for organizations every day. It is critical that organizations ensure users have access to the same information they have when they are in the office. In most cases, these workers will have some sort of laptop, office desktop, Smartphone, or PDA. From these devices, users may be able to access their data directly through VPN connections, Web servers, or some other connectivity method into the corporate networks as seen below.
  • #5: An OCA allows a remote worker to continue to access their data, but unlike the previous scenario where the user accessed the corporate database directly, the information the worker requires is stored locally on the user’s device. In order to populate this user’s local database, an OCA will typically include some data synchronization capabilities. Data synchronization consists of the ability to periodically take information that is stored in the client database (such as SQL Server Compact) and synchronize changes with a server database (such as SQL Server). The advantage of a synchronization-based solution is that users are no longer required to have a constant network connection to access their information. Since their data is stored locally they are given constant access to their data while offloading processing requirements from the central database. Furthermore, the user is no longer limited by the network speed and can now access the data at the speed of the device.
  • #6: When a remote “requestor” requests changes, SQL Server 2008 will provide all of the changes that have occurred since the last successful download as specified by the requestor. The Sync Framework database synchronization providers have been built to take advantage of SQL Server 2008 change tracking and provide the following advantages for an OCA environment:
  • #14: http://msdn.microsoft.com/en-us/library/ee617386%28v=sql.105%29.aspx