Learn how to use the Microsoft Sync Framework to build sync-enabled applications to enable online and offline scenarios leveraging services across a broad variety of endpoints. Also find out how to expose data as FeedSync compatible RSS and ATOM feeds.
DSPy a system for AI to Write Prompts and Do Fine Tuning
Using the Microsoft Sync Framework and FeedSync
1.
2.
3. 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
4. Why take content offline?
Introducing Microsoft Sync Framework
Sync Framework In Action: Contacts Demo
FeedSync
A common format for sync interchange
Future Directions
ADO.NET Data Services / Project Codename
“Astoria Offline”
SQL Server Data Services + Sync
5. Computers aren't just on desktops anymore
Computing is going mobile:
In Q307 “Portable PC shipments as
a whole grew 37.1% year on year
during the third quarter, compared
with 4.0% for desktops.” (IDC 2008)
“By 2010, total smartphone sales will
have 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
6. Core problem is synchronization:
How do I keep a local cache of data in sync with a
remote endpoint?
Many hard cases: conflicts, interruptions
Correct synchronization algorithms are non-trivial
Answer: Microsoft Sync Framework
7. • Applications designed for sync are always
Improved application
available
availability
• Offline clients leverage local storage and only
Improved network
send & receive the necessary information
utilization
Lower costs for servers
• Cache commonly used information
servicing clients
• Faster response
Leverage the client UI
• Richer user experience
• Access and update information from
Leverage the service anywhere
• Peer-to-peer topologies where clients can
Easily extend for
sync even when server is unavailable
collaboration
8. Solves hard sync problems so you don’t have to
Conflict detection and resolution
Connection and storage errors
Numerous corner cases
Supports unreliable networks, i.e.
interruptions/partial syncs
Easy-to-use and performant
9. Supports arbitrary data stores and data types
Sync Provider: Extension point to expose your endpoint to the
Sync Framework
Could 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 protocols
Most protocols can be easily extended to support the
necessary metadata
Built-in support for FeedSync
Handles arbitrary topologies
From a one-way hub-and-spoke, to a peer-to-peer mesh
10. Applications
End-to-End Solutions
Project
Sync Services
Codename
for ADO.NET “Astoria Offline”
Protocol and Store Providers
3rd Party
Relational File Sync
Astoria Offline
FeedSync
Provider
Provider Provider providers
“Make-it-simple” Services
“Simple”
Anchor
Metadata Store
Providers Providers
Common Sync Metadata and Runtime
Change Conflict
Knowledge Versions
Enumeration Detection
11. RTM Date Q3/2008;
CTP2 available now – visit msdn.com/sync
Windows 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
12. 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…
14. Synchronizing Contacts between
endpoints
Outlook, Pocket Outlook,
Web Storage,
Line-of-business application
Each endpoint exposed for
synchronization via a Sync
Provider
Line of
Outlook Provider, Business
Outlook Pocket
Pocket Outlook Provider, etc. Outlook
A Sync-Controlling Application
Manages synchronization sessions
between providers
15. Sync
Controlling
Application
Microsoft Sync Sync
Framework Orchestrator
changes
Sync Provider Sync Provider
Data Data
Store Store
changes changes
16. Sync Providers extend synchronization across to
arbitrary endpoints
Sync Provider is a common interface expected by the
sync engine
Sync 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
17. Synchronization 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
18. How 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 number
Time
19. Microsoft Sync Framework includes built-
in support for generating and consuming
FeedSync feeds
FeedSync Feed
Sync Provider
Manager
Data FeedSync Feed
Store (RSS / Atom)
21. 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
22. FeedSync Feed
(RSS / Atom)
Line of
Business
Outlook Pocket
Outlook
23. Introducing quot;Astoria Offlinequot;
As you’ve seen, out-of-the-box
Microsoft Sync Framework lets you take any data,
including web data, offline
Any endpoint
Any data format
Any 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”
24.
25. a.k.a Project quot;Astoriaquot;
Online
clients
Create and consume
data services
Atom,
Simple, RESTful JSON,
XML
interface for data
Uniform URL convention
Atom, JSON and plain
XML formats
Astoria
Server
Windows Live, SQL v1
Data Services
compatible
26. Online
Imagine you point to a Offline clients with SQL
clients
data service and just Server Compact local store
say: “take it offline”
Then work as if the data
was all local
FeedSync
And have the system Atom, over Atom
synchronize in the JSON,
XML
background
…well, we want to “Astoria”
make it almost that Server
v.Next
easy
Sync-enabled
data source
27. Easily create internet-enabled, offline
desktop applications
Take “Astoria” services offline
Automatically create local Compact store and
.NET classes based on service metadata
Microsoft Sync Framework provides the sync
magic on client and service ends
Open, documented FeedSync wire format
Very early stages, we’re exploring the space
28. Your Data Any Place, Any Time
Microsoft® SQL Server® Data Services (SSDS) is a
Web facing data storage and processing utility
Business Ready
Scales without
Application
SLA
Limits
Agility
• Built using robust Microsoft
• Simple, flexible data • Storage and processing
SQL Server technology
model scales without restrictions
• SLA for business continuity
• REST and SOAP • Businesses pay only for
protocols support the resources consumed
• Highly available, reliable
and secure
29. Software + Services
Client Web Services
SYNC Mobile and
Applications
Desktop
Internet Standard Interfaces and
Protocols (SOAP/REST/APP)
ADO.Net Data ADO.Net Data
SQL Server Data Services Framework Services
Services (SSDS) Framework
Windows Live
Services
On Premises
SYNC SYNC SYNC
30. Why synchronize?
Introduction to Microsoft Sync Framework
Sync Framework In Action: Contacts Demo
Rich offline application
FeedSync
A common format for synchronization data interchange
“Astoria Offline”
Easily take and use REST web services offline
SQL Server Data Services
Software plus services storage, connected by sync
32. Sync and Roaming Developer Center
http://msdn.microsoft.com/sync
SDK (including documentation)
Whitepapers
Samples (including several end-to-end)
Come visit us afterwards:
Sync at Open Space:
More Demos / Chalk Talk – Noon, Open Space in Theater
Discuss Microsoft Sync Framework in more detail
Discuss 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