learn why you want to take content offline learn how the microsoft sync framework lets you take...

33

Upload: toby-mckinney

Post on 28-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Using Microsoft Sync Frameworkand FeedSync

Neil PadgettProgram ManagerMicrosoft Corporation

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

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

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

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

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

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

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

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

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

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…

DemoSync Framework in Action: Contacts Sync

Liam Cavanagh Program ManagerMicrosoft Corporation

demo

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

Sync Orchestrator

What is a Sync Session?

Sync Provider

Sync Controlling Application

Sync Provider

DataStore

Data Store

changes

changes changes

Microsoft Sync Framework

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

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

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

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)

DemoFeedSync Provider

Neil PadgettProgram ManagerMicrosoft Corporation

demo

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

Demo Topology (revisited)

FeedSync Feed(RSS / Atom)

PocketOutlook

Outlook

Line of Business

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”

"Astoria Offline" Demo

Pablo CastroTechnical LeadMicrosoft Corporation

demo

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

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

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

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

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

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

Q&A

Questions?

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

© 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.