140 likes | 592 Views
The Microsoft Sync Framework and SharePoint 2010. Gustavo Velez Avanade 2010-01-19. Outline. Introduction: the Microsoft Sync Framework Implementation of the Sync Framework in SharePoint 2010 The SharePoint ChangeLog. The Microsoft Sync Framework - 01.
E N D
The Microsoft Sync Framework and SharePoint 2010 Gustavo Velez Avanade 2010-01-19
Outline • Introduction: the Microsoft Sync Framework • Implementation of the Sync Framework in SharePoint 2010 • The SharePoint ChangeLog
The Microsoft Sync Framework - 01 • “synchronization platform enabling collaboration and offline for applications, services and devices” (Microsoft) • Created in 2007 • Currently in version 2.1 (Redistributable http://www.microsoft.com/download/en/details.aspx?id=19502) • SDK: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14159
The Microsoft Sync Framework - 02 • Architecture
The Microsoft Sync Framework - 03 • Components • Participants (Provider + associated replica + sync metadata) – Types: Full, Partial and Simple • Provider – Supplied OOTB: for ADO.NET, File System and FeedSync (RSS & ATOM feeds) • Data Source • Metadata • Versions(essentially a tuple consisting of a sync endpoint Id which made a change and logical clock of the time when the change was made) • Knowledge(covers all changes [versions of all known items]) • Tick Count (specific to a replica; combined with a replica key to make a version) • Replica ID (repository of information to be synchronized) • Tombstones (track dead [or deleted] items) • Conflict Resolution
The Microsoft Sync Framework - 04 • Example • SyncToy (http://www.microsoft.com/download/en/details.aspx?id=15155) • SyncToy and SharePoint
SharePoint Implementation - 01 • Sync Framework is one of the Installation Prerequisites of SharePoint 2010 • SharePoint Workspace 2010 works with the Sync Framework • Sync Foundation implemented as a number of WebService Methods (new in 2010) • Uses the SharePoint ChangeLog as SharePoint internal synchronization mechanism
SharePoint Implementation - 02 WebSvcListWebService (Lists.asmx) • GetListItems • Returns all Items, no possibilities for sync • GetListItemChanges • Parameter “since” plus custom filter (“contains”). No usable for Sync Foundation • GetListItemChangesSinceToken (Async + Completed Event Handler) • Request without token returns list schema, full list contents, and a token • Changes in the list schema itself returns entire list schema, full list contents, and a token • GetListItemChangesWithKnowledge (Async + Completed Event Handler) • Returns “Knowledge” metadata (has no Token, but it is implicit defined in the knowledge) • UpdateListItemsWithKnowledge • Makes inserts, updates, and deletions to specified list items and provides the server with current knowledge metadata • Example • Using GetListItemChangesSinceToken and GetListItemChangesWithKnowledge
SharePoint Implementation - 03 • Use Cases: • Sync File Directory to SharePoint Library • SharePoint aggregators • Farm Replication (ex. Iora[http://www.iora.com/index.php], Syntergy [http://www.syntergy.com/products/sharepoint/replicator/]) • Issues (not only for SharePoint, btw...) • Latency • Throughput • Bandwidth • Paging • Filtering and Ordering
The SharePoint ChangeLog- 01 • Kernel functionality for the Sync Framework inside SharePoint • Used by other SharePoint components (Incremental Crawl for example) • Is table in each Content DataBase (EventCache) • Retention time (60 days default) configurable: • Resource Throttling WebAppin UI • Object Model (ChangeLogRetentionPeriod, ChangeLogExpirationEnabled) • PowerShell • not security-trimmed
The SharePoint ChangeLog- 02 • Scopes: List, SPWeb, SPSite, Content database • Objects: • Items, files, folders, List metadata, SPWeb metadata, Security policy, users, and groups • Web application configuration, Global administration settings, Binary deployment, Web Parts and safe controls; Web site, site collection, content database, or Web application configuration • Type Changes: Add, Update, Delete, Rename, Move away from a source list, Move into a destination list
The SharePoint ChangeLog- 03 • ChangeLog API: • GetChanges method of SPList, SPWeb, SPSite, and SPContentDatabase • SPChangeCollection (coll. of SPChange objects) • SPChangeQuery • SPChangeToken • Example
Summary • Microsoft has a Sync Framework... • Thatis implemented in SharePoint 2010... • That relays on the SharePoint ChangeLog mechanism...
Questions, Comments, Whatever... Gustavo Velez Avanade Corp. gustavo.velez@avanade.com http://www.gavd.net