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

What's hot

Client server architecture
Client server architectureClient server architecture
Client server architecture
Bhargav Amin
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mule
mdfkhan625
 
Client Server Computing : unit 1
Client Server Computing : unit 1Client Server Computing : unit 1
Client Server Computing : unit 1
THIRUNEELAKANDAN ARCHUNAN
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectors
himajareddys
 
Database operations
Database operationsDatabase operations
Database operations
Robert Crane
 
oracle
oracleoracle
oracle
tarunamoria
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
Kranthi Paidi
 
Sql server replication step by step
Sql server replication step by stepSql server replication step by step
Sql server replication step by step
laonap166
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Softwarewebhostingguy
 
Case Management by EMC - xCP Platform
 Case Management by EMC - xCP Platform Case Management by EMC - xCP Platform
Case Management by EMC - xCP Platform
Amplexor
 
armür magnet
armür magnetarmür magnet
armür magnet
Mehmet Kocayiğit
 
Siebel deployment
Siebel deploymentSiebel deployment
Siebel deployment
Roman Agaev
 
Business Analytics System
Business Analytics SystemBusiness Analytics System
Business Analytics System
Mahesh Patwardhan
 
Testing web applications
Testing web applicationsTesting web applications
Testing web applicationsmsksaba
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratAttaullah Hazrat
 
Microsoft exchange-server-2013-installation
Microsoft exchange-server-2013-installationMicrosoft exchange-server-2013-installation
Microsoft exchange-server-2013-installation
takdirlovely09
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11Tech_MX
 
Data Warehousing Practical for T.Y.I.T.
Data Warehousing Practical for T.Y.I.T.Data Warehousing Practical for T.Y.I.T.
Data Warehousing Practical for T.Y.I.T.
Niraj Bharambe
 

What's hot (20)

Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mule
 
Client Server Computing : unit 1
Client Server Computing : unit 1Client Server Computing : unit 1
Client Server Computing : unit 1
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectors
 
Database operations
Database operationsDatabase operations
Database operations
 
oracle
oracleoracle
oracle
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
 
Sql server replication step by step
Sql server replication step by stepSql server replication step by step
Sql server replication step by step
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
 
People soft overview
People soft overviewPeople soft overview
People soft overview
 
Case Management by EMC - xCP Platform
 Case Management by EMC - xCP Platform Case Management by EMC - xCP Platform
Case Management by EMC - xCP Platform
 
armür magnet
armür magnetarmür magnet
armür magnet
 
Siebel deployment
Siebel deploymentSiebel deployment
Siebel deployment
 
Business Analytics System
Business Analytics SystemBusiness Analytics System
Business Analytics System
 
Testing web applications
Testing web applicationsTesting web applications
Testing web applications
 
PAC
PACPAC
PAC
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah Hazrat
 
Microsoft exchange-server-2013-installation
Microsoft exchange-server-2013-installationMicrosoft exchange-server-2013-installation
Microsoft exchange-server-2013-installation
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11
 
Data Warehousing Practical for T.Y.I.T.
Data Warehousing Practical for T.Y.I.T.Data Warehousing Practical for T.Y.I.T.
Data Warehousing Practical for T.Y.I.T.
 

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

Syn framework 4.0 and sql server
Syn framework 4.0 and sql serverSyn framework 4.0 and sql server
Syn framework 4.0 and sql server
Eduardo Castro
 
M.S. Dissertation in Salesforce on Force.com
M.S. Dissertation in Salesforce on Force.comM.S. Dissertation in Salesforce on Force.com
M.S. Dissertation in Salesforce on Force.com
Arun Somu Panneerselvam
 
Datasheet datapowerpluginforrd
Datasheet datapowerpluginforrdDatasheet datapowerpluginforrd
Datasheet datapowerpluginforrdMidVision
 
127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation
Nitesh Kumar
 
Running Head System Proposal .docx
Running Head System Proposal                                     .docxRunning Head System Proposal                                     .docx
Running Head System Proposal .docx
agnesdcarey33086
 
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdfSchema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
seo18
 
"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends
Derek Baron
 
Cloud architecture
Cloud architectureCloud architecture
Cloud architectureAdeel Javaid
 
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...sameh samir
 
Web Based Investment Management System
Web Based Investment Management SystemWeb Based Investment Management System
Web Based Investment Management System
Mike Taylor
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
ABDEL RAHMAN KARIM
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
Shreyans Jasoriya
 
Cloudera federal summit
Cloudera federal summitCloudera federal summit
Cloudera federal summit
Matt Carroll
 
Datasheet scriptspluginforrd
Datasheet scriptspluginforrdDatasheet scriptspluginforrd
Datasheet scriptspluginforrdMidVision
 
Cloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
Cloudera Federal Forum 2014: EzBake, the DoDIIS App EngineCloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
Cloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
Cloudera, Inc.
 
Luis Perez ITS written report
Luis Perez ITS written reportLuis Perez ITS written report
Luis Perez ITS written reportLuis Perez
 
Datasheet.net pluginforrd
Datasheet.net pluginforrdDatasheet.net pluginforrd
Datasheet.net pluginforrdMidVision
 
What is Data Binding and what are the Advantage of Data Binding.pdf
What is Data Binding and what are the Advantage of Data Binding.pdfWhat is Data Binding and what are the Advantage of Data Binding.pdf
What is Data Binding and what are the Advantage of Data Binding.pdf
TechnicalChamber1
 
Transcend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC ProductsTranscend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC Products
Baiju P.S.
 

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

Syn framework 4.0 and sql server
Syn framework 4.0 and sql serverSyn framework 4.0 and sql server
Syn framework 4.0 and sql server
 
M.S. Dissertation in Salesforce on Force.com
M.S. Dissertation in Salesforce on Force.comM.S. Dissertation in Salesforce on Force.com
M.S. Dissertation in Salesforce on Force.com
 
Datasheet datapowerpluginforrd
Datasheet datapowerpluginforrdDatasheet datapowerpluginforrd
Datasheet datapowerpluginforrd
 
127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation
 
Running Head System Proposal .docx
Running Head System Proposal                                     .docxRunning Head System Proposal                                     .docx
Running Head System Proposal .docx
 
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdfSchema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
 
"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends
 
Cloud architecture
Cloud architectureCloud architecture
Cloud architecture
 
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
 
TermPaper
TermPaperTermPaper
TermPaper
 
Web Based Investment Management System
Web Based Investment Management SystemWeb Based Investment Management System
Web Based Investment Management System
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Cloudera federal summit
Cloudera federal summitCloudera federal summit
Cloudera federal summit
 
Datasheet scriptspluginforrd
Datasheet scriptspluginforrdDatasheet scriptspluginforrd
Datasheet scriptspluginforrd
 
Cloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
Cloudera Federal Forum 2014: EzBake, the DoDIIS App EngineCloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
Cloudera Federal Forum 2014: EzBake, the DoDIIS App Engine
 
Luis Perez ITS written report
Luis Perez ITS written reportLuis Perez ITS written report
Luis Perez ITS written report
 
Datasheet.net pluginforrd
Datasheet.net pluginforrdDatasheet.net pluginforrd
Datasheet.net pluginforrd
 
What is Data Binding and what are the Advantage of Data Binding.pdf
What is Data Binding and what are the Advantage of Data Binding.pdfWhat is Data Binding and what are the Advantage of Data Binding.pdf
What is Data Binding and what are the Advantage of Data Binding.pdf
 
Transcend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC ProductsTranscend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC Products
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

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

  1. 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. 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.
  3. 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:
  4. http://msdn.microsoft.com/en-us/library/ee617386%28v=sql.105%29.aspx