![Page 1: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/1.jpg)
![Page 2: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/2.jpg)
Using Microsoft Sync Frameworkand FeedSync
Neil PadgettProgram ManagerMicrosoft Corporation
![Page 3: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/3.jpg)
Learning Objectives
Learn why you want to take content offline
Learn how the Microsoft Sync Framework lets you take content offline
Including working with FeedSync
Learn about Project Codename “Astoria Offline” and what it promises for taking web services offline
Learn about how sync fits with SQL Server Data Services
![Page 4: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/4.jpg)
Agenda
Why take content offline?Introducing Microsoft Sync FrameworkSync Framework In Action: Contacts DemoFeedSync
A common format for sync interchangeFuture Directions
ADO.NET Data Services / Project Codename “Astoria Offline”SQL Server Data Services + Sync
![Page 5: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/5.jpg)
Why take content offline?Computers aren't just on desktops anymoreComputing is going mobile:
In Q307 “Portable PC shipments as a whole grew 37.1% year on yearduring the third quarter, comparedwith 4.0% for desktops.” (IDC 2008)
“By 2010, total smartphone sales willhave surpassed 1 billion units” (Gartner 2008)
Computing is on the move, but mobile connectivity is not ubiquitous
Carrier that claims the “largest” mobile broadband network, covers about 230 Million Americans, only about 76% of the US population
![Page 6: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/6.jpg)
How do we take content offline?
Core problem is synchronization:How do I keep a local cache of data in sync with a remote endpoint?
Many hard cases: conflicts, interruptionsCorrect synchronization algorithms are non-trivial
Answer: Microsoft Sync Framework
![Page 7: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/7.jpg)
Benefits of Synchronization
•Applications designed for sync are always available
Improved application availability
•Offline clients leverage local storage and only send & receive the necessary information
Improved network utilization
•Cache commonly used informationLower costs for servers servicing clients
•Faster response•Richer user experience
Leverage the client UI
•Access and update information from anywhere
Leverage the service
•Peer-to-peer topologies where clients can sync even when server is unavailable
Easily extend for collaboration
![Page 8: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/8.jpg)
Sync Framework is PowerfulSolves hard sync problems so you don’t have to
Conflict detection and resolutionConnection and storage errorsNumerous corner cases
Supports unreliable networks, i.e. interruptions/partial syncs
Easy-to-use and performant
![Page 9: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/9.jpg)
Sync Framework is FlexibleSupports arbitrary data stores and data types
Sync Provider: Extension point to expose your endpoint to the Sync FrameworkCould write a provider for:
A service (e.g. web storage)A desktop application (e.g. Microsoft Outlook)A device (e.g. Digital Camera, Digital Music Player)
Operates over arbitrary protocolsMost protocols can be easily extended to support the necessary metadataBuilt-in support for FeedSync
Handles arbitrary topologiesFrom a one-way hub-and-spoke, to a peer-to-peer mesh
![Page 10: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/10.jpg)
Layers of the Framework
Common Sync Metadata and Runtime
“Make-it-simple” Services
Protocol and Store Providers
3rd Party providers
End-to-End Solutions
Applications
Knowledge VersionsChange
EnumerationConflict
Detection
Metadata Store
Anchor Providers
“Simple” Providers
Relational Provider
Astoria Offline
Provider
File Sync Provider
Sync Services for
ADO.NET
Project Codename
“Astoria Offline”
FeedSync
![Page 11: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/11.jpg)
Microsoft Sync Framework
RTM Date Q3/2008;CTP2 available now – visit msdn.com/syncWindows Mobile CTP Q3/2008
Support for multiple development languages
Managed Code (C#, Visual Basic, etc..)Native/Unmanaged Code (C++, etc..)
Licensing for other platforms available
![Page 12: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/12.jpg)
What can I do with sync?
Synchronization is the process of keeping data sets in sync across multiple endpoints
This lets you do:offline:synchronize a data set between client and server
peer-to-peer / roaming:synchronize a data set between endpoints, rather than just hub-spoke with a server
collaboration / sharing:synchronize a data set between multiple users (either peer-to-peer, or via a shared server)
Now, let’s see the Sync Framework in action…
![Page 13: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/13.jpg)
DemoSync Framework in Action: Contacts Sync
Liam Cavanagh Program ManagerMicrosoft Corporation
demo
![Page 14: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/14.jpg)
Demo
Synchronizing Contacts between endpoints
Outlook, Pocket Outlook, Web Storage, Line-of-business application
Each endpoint exposed for synchronization via a Sync Provider
Outlook Provider, Pocket Outlook Provider, etc.
A Sync-Controlling Application
Manages synchronization sessions between providers
PocketOutloo
k
OutlookLine of Busines
s
![Page 15: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/15.jpg)
Sync Orchestrator
What is a Sync Session?
Sync Provider
Sync Controlling Application
Sync Provider
DataStore
Data Store
changes
changes changes
Microsoft Sync Framework
![Page 16: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/16.jpg)
Connecting Arbitrary Endpoints
Sync Providers extend synchronization across to arbitrary endpoints
Sync Provider is a common interface expected by the sync engineSync Providers interchange data with sync engine using a common metadata format
However, we can also interoperate via a common data interchange format / protocol
One common format is FeedSync
![Page 17: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/17.jpg)
FeedSyncSynchronization for RSS / ATOM
FeedSync is a set of extensions to RSS / ATOM
Open format - specification is publically available on MSDN under Creative Commons™ License
Enhances standard feed formats to support multi-master synchronization
Extensions add metadata needed to support synchronization (versions)Open-format makes cross-platform interoperability easy
![Page 18: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/18.jpg)
FeedSyncHow is a FeedSync feed different?
Adds information so the RSS/ATOM feed reflects item changes instead of items:
Type of change: Create / Update / Delete
Where changes happened:Endpoint Id
When changes happened: Sequence numberTime
![Page 19: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/19.jpg)
Microsoft Sync Framework andFeedSyncMicrosoft Sync Framework includes
built-in support for generating and consuming FeedSync feeds
DataStore
FeedSync Feed Manager
Sync Provider
FeedSync Feed(RSS / Atom)
![Page 20: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/20.jpg)
DemoFeedSync Provider
Neil PadgettProgram ManagerMicrosoft Corporation
demo
![Page 21: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/21.jpg)
FeedSync Provider Demo
We’ll extend our contacts demo to generate a FeedSync feed
We could do this from any endpoint; we’ll choose to generate a feed from our line-of-business application
![Page 22: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/22.jpg)
Demo Topology (revisited)
FeedSync Feed(RSS / Atom)
PocketOutlook
Outlook
Line of Business
![Page 23: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/23.jpg)
Offline: End-to-end for Web DataIntroducing "Astoria Offline"As you’ve seen, out-of-the-box
Microsoft Sync Framework lets you take any data, including web data, offline
Any endpointAny data formatAny protocol
But what if we say our endpoint is a web service, we know the data format, and our protocol is http – can we make it easier?
We think yes! Our answer is Project Codename “Astoria Offline”
![Page 24: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/24.jpg)
"Astoria Offline" Demo
Pablo CastroTechnical LeadMicrosoft Corporation
demo
![Page 25: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/25.jpg)
ADO.NET Data Services Frameworka.k.a Project "Astoria"
Create and consume data services
Simple, RESTful interface for data
Uniform URL conventionAtom, JSON and plain XML formats
Windows Live, SQL Data Services compatible
Atom, JSON, XML
Astoria Server
v1
Online clients
![Page 26: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/26.jpg)
Taking "Astoria" Services Offline
Imagine you point to a data service and just say: “take it offline”
Then work as if the data was all localAnd have the system synchronize in the background
…well, we want to make it almost that easy
Atom, JSON, XML
“Astoria” Server v.Next
Online clients
FeedSync over Atom
Sync-enabled data source
Offline clients with SQL Server Compact local
store
![Page 27: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/27.jpg)
Summary for "Astoria Offline"
Easily create internet-enabled, offline desktop applications
Take “Astoria” services offlineAutomatically create local Compact store and .NET classes based on service metadataMicrosoft Sync Framework provides the sync magic on client and service endsOpen, documented FeedSync wire format
Very early stages, we’re exploring the space
![Page 28: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/28.jpg)
SQL Server Data ServicesYour Data Any Place, Any Time
Scales without Limits
• Storage and processing scales without restrictions
• Businesses pay only for the resources consumed
Application Agility
• Simple, flexible data model
• REST and SOAP protocols support
Business Ready SLA
• Built using robust Microsoft SQL Server technology
• SLA for business continuity
• Highly available, reliable and secure
Microsoft® SQL Server® Data Services (SSDS) is aWeb facing data storage and processing utility
![Page 29: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/29.jpg)
Data Services VisionSoftware + Services
SQL Server Data Services (SSDS)
ADO.Net Data Services
Framework
Windows Live Services
SYNC
SYNC SYNC SYNC
ADO.Net Data Services Framework
On Premises
Internet Standard Interfaces and Protocols (SOAP/REST/APP)
Mobile andDesktop
Client Applications
Web Services
![Page 30: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/30.jpg)
What we covered
Why synchronize?Introduction to Microsoft Sync FrameworkSync Framework In Action: Contacts Demo
Rich offline application
FeedSyncA common format for synchronization data interchange
“Astoria Offline”Easily take and use REST web services offline
SQL Server Data ServicesSoftware plus services storage, connected by sync
![Page 31: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/31.jpg)
Q&A
Questions?
![Page 32: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/32.jpg)
ResourcesSync and Roaming Developer Centerhttp://msdn.microsoft.com/sync
SDK (including documentation)WhitepapersSamples (including several end-to-end)
Come visit us afterwards:Sync at Open Space: More Demos / Chalk Talk – Noon, Open Space in TheaterDiscuss Microsoft Sync Framework in more detailDiscuss your scenarios for synchronization
Other sessions:BT02 - Building RESTful Real World Applications with the ADO.NET Data Services Framework (Delfino 4101A, 11:45 am)SQL Server Data Services Chalk Talk – 11:30, Open Space
![Page 33: Using the Microsoft Sync Framework and FeedSync](https://reader036.vdocument.in/reader036/viewer/2022062614/54664496b4af9f623f8b52f8/html5/thumbnails/33.jpg)
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.