SlideShare una empresa de Scribd logo
1 de 23
Microsoft Sync
Framework
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.
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.
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
What is Sync Framework?
Sync Framework is a comprehensive synchronization platform that enables
developers to add synchronization capabilities to applications, services, and devices.
Sync Framework solves the problem of how to synchronize any type of data in any
store using any protocol over any topology. Fundamental to Sync Framework is the
ability to support offline and collaboration of data between any types of endpoints
(such as device to desktop, device to server, etc.).
Sync Framework database synchronization providers enable synchronization
between ADO.NET-enabled databases. Since the database synchronization
providers are part of the Sync Framework, any database that uses these providers
can then also exchange information with other data sources that are supported by
Sync Framework, such as web services, file systems, or custom data stores.
Change Tracking
Change tracking is the ability to provide a list of changes (insert, updates, and deletes) that
were made to the database from one point in time to another. Imagine a remote user who
connects to the central database and wishes to bring their data up to date since the last
time they were online. Without change tracking, this user would need to take all of the data
from the central data source and then merge that data with the changes that the user
made to the local database on the user’s computer or device
The major disadvantages to this solution are:
✗ Changes are required in the central database schema to add columns and tables that
may affect current applications.
✗ Triggers are fired for each change made to a row, which has performance implications.
✗ Logic for maintaining proper rowversions and row deletions can get extremely
complicated.
✗ Long running transactions can result in some data being missed during synchronization,
resulting in data inconsistencies.
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. In certain cases, the DML overhead associated with
trigger based change tracking can be 400% greater than that of SQL Server 2008
change tracking. The overhead of enabling SQL Server 2008 change tracking is similar
to the overhead of maintaining a second index.
✎ 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.
Database Synchronization with
Microsoft Sync Framework
2. Add a Local Database Cache leaving the name set to it's default value:
1. Add needed references:
3. Select tables, configure them and copy code sample:
4. Choose objects of your dataset:Wizard has produced following items:
Local cache
SQL scripts
Dataset
Sync direction
Description
DownloadOnly
During the first synchronization, the client typically downloads schema and an initial data set
from the server. On subsequent synchronizations, the client downloads changes from the
server.
UploadOnly
During the first synchronization, the client typically downloads schema from the server. On
subsequent synchronizations, the client uploads changes to the server.
Bidirectional
During the first synchronization, the client typically downloads schema and an initial data set
from the server. On subsequent synchronizations, the client uploads changes to the server
and then downloads changes from the server.
Snapshot
The client downloads a set of data from the server. The data is completely refreshed during
each synchronization.
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.
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.
Description
Continue
Continue processing, and add the row to the list of conflicts that are defined in the
SyncConflict object. This is the default behavior.
RetryApplyingRow Try to apply the row one more time.
RetryWithForceWrite
Force the row to be applied by using logic that is included in synchronization
adapter commands.
RetryNextSync
Store the row as an exception, and try to apply the row during the next
synchronization session. Only valid for peer to peer synchronization.
ApplyAction Enumeration
Synchronization using WCF services
1. Add WCF project to solution
2. Add a Local Database Cache to main project
3. Select tables, configure them and copy code sample:
4. Choose objects of your dataset:Wizard has produced following items:
Separated Local
Data cache
Dataset
Separated Local
Data cache
5. Open NorthwindDataCache1.Server.SyncContract.cs in WCF project and
copy selected code examples to App.config in the same project
6. Compile WCF service project and add reference to it in main
project
7. Separate code of Local Data Cache:
Server side – to WCF service,
Client side – on main project.
Code samples
Questions

Más contenido relacionado

La actualidad más candente

Informatica Server Manager
Informatica Server ManagerInformatica Server Manager
Informatica Server Managerganblues
 
Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architectureSekhar Byna
 
what is sccm ? sccm online Training
what is sccm ? sccm online Training what is sccm ? sccm online Training
what is sccm ? sccm online Training KashifSCCMTrainer
 
Mulesoft Filters
Mulesoft FiltersMulesoft Filters
Mulesoft Filtersmdfkhan625
 
Hyperion LCM Utility
Hyperion LCM UtilityHyperion LCM Utility
Hyperion LCM UtilityAmit Sharma
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mulemdfkhan625
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectorshimajareddys
 
Informatica Training | Informatica PowerCenter | Informatica Tutorial | Edureka
Informatica Training | Informatica PowerCenter | Informatica Tutorial | EdurekaInformatica Training | Informatica PowerCenter | Informatica Tutorial | Edureka
Informatica Training | Informatica PowerCenter | Informatica Tutorial | EdurekaEdureka!
 
Client server architecture
Client server architectureClient server architecture
Client server architectureBhargav Amin
 
Siebel deployment
Siebel deploymentSiebel deployment
Siebel deploymentRoman Agaev
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoringKranthi Paidi
 
Database operations
Database operationsDatabase operations
Database operationsRobert Crane
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Softwarewebhostingguy
 
Microsoft Dynamics CRM 2013 development server installation
Microsoft Dynamics CRM 2013 development server installationMicrosoft Dynamics CRM 2013 development server installation
Microsoft Dynamics CRM 2013 development server installationJukka Niiranen
 

La actualidad más candente (20)

Clustering overview2
Clustering overview2Clustering overview2
Clustering overview2
 
Informatica Server Manager
Informatica Server ManagerInformatica Server Manager
Informatica Server Manager
 
Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architecture
 
Csc concepts
Csc conceptsCsc concepts
Csc concepts
 
what is sccm ? sccm online Training
what is sccm ? sccm online Training what is sccm ? sccm online Training
what is sccm ? sccm online Training
 
Mulesoft Filters
Mulesoft FiltersMulesoft Filters
Mulesoft Filters
 
Hyperion LCM Utility
Hyperion LCM UtilityHyperion LCM Utility
Hyperion LCM Utility
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mule
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectors
 
IUG ATL PC 9.5
IUG ATL PC 9.5IUG ATL PC 9.5
IUG ATL PC 9.5
 
Power BI Interview Questions
Power BI Interview QuestionsPower BI Interview Questions
Power BI Interview Questions
 
Informatica Training | Informatica PowerCenter | Informatica Tutorial | Edureka
Informatica Training | Informatica PowerCenter | Informatica Tutorial | EdurekaInformatica Training | Informatica PowerCenter | Informatica Tutorial | Edureka
Informatica Training | Informatica PowerCenter | Informatica Tutorial | Edureka
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
oracle
oracleoracle
oracle
 
Client Server Computing : unit 1
Client Server Computing : unit 1Client Server Computing : unit 1
Client Server Computing : unit 1
 
Siebel deployment
Siebel deploymentSiebel deployment
Siebel deployment
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
 
Database operations
Database operationsDatabase operations
Database operations
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
 
Microsoft Dynamics CRM 2013 development server installation
Microsoft Dynamics CRM 2013 development server installationMicrosoft Dynamics CRM 2013 development server installation
Microsoft Dynamics CRM 2013 development server installation
 

Similar a Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik

Datasheet datapowerpluginforrd
Datasheet datapowerpluginforrdDatasheet datapowerpluginforrd
Datasheet datapowerpluginforrdMidVision
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
Luis Perez ITS written report
Luis Perez ITS written reportLuis Perez ITS written report
Luis Perez ITS written reportLuis Perez
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Whitepaper tableau for-the-enterprise-0
Whitepaper tableau for-the-enterprise-0Whitepaper tableau for-the-enterprise-0
Whitepaper tableau for-the-enterprise-0alok khobragade
 
DevOps_SelfHealing
DevOps_SelfHealingDevOps_SelfHealing
DevOps_SelfHealingAtul Dhingra
 
Case Study For Replication For PCMS
Case Study For Replication For PCMSCase Study For Replication For PCMS
Case Study For Replication For PCMSShahzad
 
Harnessing the Cloud for Performance Testing- Impetus White Paper
Harnessing the Cloud for Performance Testing- Impetus White PaperHarnessing the Cloud for Performance Testing- Impetus White Paper
Harnessing the Cloud for Performance Testing- Impetus White PaperImpetus Technologies
 
Transcend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC ProductsTranscend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC ProductsBaiju P.S.
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewDhanik Sahni
 
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.pdfseo18
 
Datasheet agentpluginforrd
Datasheet agentpluginforrdDatasheet agentpluginforrd
Datasheet agentpluginforrdMidVision
 
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.comArun Somu Panneerselvam
 
Datasheet.net pluginforrd
Datasheet.net pluginforrdDatasheet.net pluginforrd
Datasheet.net pluginforrdMidVision
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasDatavail
 
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0Prasad Mukhedkar
 
Application-Servers.pdf
Application-Servers.pdfApplication-Servers.pdf
Application-Servers.pdfSamir Paul
 

Similar a Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik (20)

Datasheet datapowerpluginforrd
Datasheet datapowerpluginforrdDatasheet datapowerpluginforrd
Datasheet datapowerpluginforrd
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Luis Perez ITS written report
Luis Perez ITS written reportLuis Perez ITS written report
Luis Perez ITS written report
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Whitepaper tableau for-the-enterprise-0
Whitepaper tableau for-the-enterprise-0Whitepaper tableau for-the-enterprise-0
Whitepaper tableau for-the-enterprise-0
 
DevOps_SelfHealing
DevOps_SelfHealingDevOps_SelfHealing
DevOps_SelfHealing
 
Case Study For Replication For PCMS
Case Study For Replication For PCMSCase Study For Replication For PCMS
Case Study For Replication For PCMS
 
Harnessing the Cloud for Performance Testing- Impetus White Paper
Harnessing the Cloud for Performance Testing- Impetus White PaperHarnessing the Cloud for Performance Testing- Impetus White Paper
Harnessing the Cloud for Performance Testing- Impetus White Paper
 
Transcend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC ProductsTranscend Automation's Kepware OPC Products
Transcend Automation's Kepware OPC Products
 
TermPaper
TermPaperTermPaper
TermPaper
 
Client server computing
Client server computingClient server computing
Client server computing
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
 
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
 
Datasheet agentpluginforrd
Datasheet agentpluginforrdDatasheet agentpluginforrd
Datasheet agentpluginforrd
 
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.net pluginforrd
Datasheet.net pluginforrdDatasheet.net pluginforrd
Datasheet.net pluginforrd
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
 
How to Migrate Without Downtime
How to Migrate Without DowntimeHow to Migrate Without Downtime
How to Migrate Without Downtime
 
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0Openstack Cloud  Management and Automation Using Red Hat Cloudforms 4.0
Openstack Cloud Management and Automation Using Red Hat Cloudforms 4.0
 
Application-Servers.pdf
Application-Servers.pdfApplication-Servers.pdf
Application-Servers.pdf
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik

  • 1. Microsoft Sync Framework 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.
  • 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.
  • 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
  • 5. What is Sync Framework? Sync Framework is a comprehensive synchronization platform that enables developers to add synchronization capabilities to applications, services, and devices. Sync Framework solves the problem of how to synchronize any type of data in any store using any protocol over any topology. Fundamental to Sync Framework is the ability to support offline and collaboration of data between any types of endpoints (such as device to desktop, device to server, etc.). Sync Framework database synchronization providers enable synchronization between ADO.NET-enabled databases. Since the database synchronization providers are part of the Sync Framework, any database that uses these providers can then also exchange information with other data sources that are supported by Sync Framework, such as web services, file systems, or custom data stores.
  • 6. Change Tracking Change tracking is the ability to provide a list of changes (insert, updates, and deletes) that were made to the database from one point in time to another. Imagine a remote user who connects to the central database and wishes to bring their data up to date since the last time they were online. Without change tracking, this user would need to take all of the data from the central data source and then merge that data with the changes that the user made to the local database on the user’s computer or device The major disadvantages to this solution are: ✗ Changes are required in the central database schema to add columns and tables that may affect current applications. ✗ Triggers are fired for each change made to a row, which has performance implications. ✗ Logic for maintaining proper rowversions and row deletions can get extremely complicated. ✗ Long running transactions can result in some data being missed during synchronization, resulting in data inconsistencies.
  • 7. 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. In certain cases, the DML overhead associated with trigger based change tracking can be 400% greater than that of SQL Server 2008 change tracking. The overhead of enabling SQL Server 2008 change tracking is similar to the overhead of maintaining a second index. ✎ 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.
  • 9. 2. Add a Local Database Cache leaving the name set to it's default value: 1. Add needed references:
  • 10. 3. Select tables, configure them and copy code sample:
  • 11. 4. Choose objects of your dataset:Wizard has produced following items: Local cache SQL scripts Dataset
  • 12. Sync direction Description DownloadOnly During the first synchronization, the client typically downloads schema and an initial data set from the server. On subsequent synchronizations, the client downloads changes from the server. UploadOnly During the first synchronization, the client typically downloads schema from the server. On subsequent synchronizations, the client uploads changes to the server. Bidirectional During the first synchronization, the client typically downloads schema and an initial data set from the server. On subsequent synchronizations, the client uploads changes to the server and then downloads changes from the server. Snapshot The client downloads a set of data from the server. The data is completely refreshed during each synchronization.
  • 13. 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.
  • 14. 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.
  • 15. Description Continue Continue processing, and add the row to the list of conflicts that are defined in the SyncConflict object. This is the default behavior. RetryApplyingRow Try to apply the row one more time. RetryWithForceWrite Force the row to be applied by using logic that is included in synchronization adapter commands. RetryNextSync Store the row as an exception, and try to apply the row during the next synchronization session. Only valid for peer to peer synchronization. ApplyAction Enumeration
  • 17. 1. Add WCF project to solution 2. Add a Local Database Cache to main project
  • 18. 3. Select tables, configure them and copy code sample:
  • 19. 4. Choose objects of your dataset:Wizard has produced following items: Separated Local Data cache Dataset Separated Local Data cache
  • 20. 5. Open NorthwindDataCache1.Server.SyncContract.cs in WCF project and copy selected code examples to App.config in the same project
  • 21. 6. Compile WCF service project and add reference to it in main project 7. Separate code of Local Data Cache: Server side – to WCF service, Client side – on main project.

Notas del editor

  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: