Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using the Microsoft Sync Framework and FeedSync


Published on

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.

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Using the Microsoft Sync Framework and FeedSync

  1. 1. 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
  2. 2. 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
  3. 3. 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
  4. 4. 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
  5. 5. • 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. RTM Date Q3/2008; CTP2 available now – visit 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
  10. 10. 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…
  11. 11. Sync Framework in Action: Contacts Sync
  12. 12. 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
  13. 13. Sync Controlling Application Microsoft Sync Sync Framework Orchestrator changes Sync Provider Sync Provider Data Data Store Store changes changes
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. Microsoft Sync Framework includes built- in support for generating and consuming FeedSync feeds FeedSync Feed Sync Provider Manager Data FeedSync Feed Store (RSS / Atom)
  18. 18. FeedSync Provider
  19. 19. 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
  20. 20. FeedSync Feed (RSS / Atom) Line of Business Outlook Pocket Outlook
  21. 21. 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”
  22. 22. 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
  23. 23. 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
  24. 24. 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
  25. 25. 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
  26. 26. 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
  27. 27. 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
  28. 28. Questions?
  29. 29. Sync and Roaming Developer Center 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
  30. 30. © 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.