Occasionally Connected Systems

16

Transcript of Occasionally Connected Systems

Page 1: Occasionally Connected Systems
Page 2: Occasionally Connected Systems

Occasionaly connected windows mobile apps using ADO.Net sync services

Rahul MaratheConsultantMicrosoft Global ServicesSession Code:

Page 3: Occasionally Connected Systems

Key Takeaways

ADO.Net sync services architectureBuild an occasionally connected app using VS 2008 SP1Implement user based data filteringConflict resolution , tracing support

Page 4: Occasionally Connected Systems

Sync Services FrameworkPlatform to build sync ecosystemsTopology, data independent frameworkBased on provider model

Page 5: Occasionally Connected Systems

Sync services frameworkApplication

Runtime

Synchronization provider

Synchronization provider

Data Source

Data Source

Page 6: Occasionally Connected Systems

ADO.Net sync services

Provider for synchronizing ADO.net based databasesSupport for peer-peer ,client-server scenariosTooling support in VS 2008 SP1Synchronization adapter builder

Page 7: Occasionally Connected Systems

ADO.net sync services configuration

SyncTable

SQL Server Compact

3.5

ClientSyncProvider

SyncGroup Server DB

Data Access

Data Forms

N-tier architectureTooling support for generating client & server side code

SyncAdapter

ServerSyncProvider

Transport

ServiceServiceProxy

SyncAgent

Page 8: Occasionally Connected Systems

Development EnvironmentServer

.Net framework v3.5 SP1, ADO.net v2.0ADO.net sync services v1.0 SP1 desktopSQL Server 2008 – change tracking enabled on the database

Client.Net compact framework v3.5ADO.net sync services v1.0 SP1 - devicesSQL Compact 3.5 SP1 – devicesWindows Mobile 6.0 Professional SDK

Development environmentVisual Studio 2008 SP1

Page 9: Occasionally Connected Systems

VS 2008 Tooling supportRahul MaratheConsultantMicrosoft Global Services India

demo

Page 10: Occasionally Connected Systems

Tooling support - summaryServer

WCF Application & WCF Library projectAdd ‘Local Data Cache’ item, configure the sync providersDecorate web service contract with XMLSerializerFormat attribute

ClientDevice application - .Net CF 3.5, SQL Compact 3.5 SP1WCF proxy

Peek into the auto generated codeServer - SyncCacheContract, SyncAdaptersClient - SyncAgent

Page 11: Occasionally Connected Systems

Customizing synchronizationServer side customization

Custom sync adapters & ‘commands’Consuming filters

Client side customizationSetting up filtersApplyingChanges eventSynchronization progress

Page 12: Occasionally Connected Systems

Customizing synchronizationRahul MaratheConsultantMicrosoft Global Services India

demo

Page 13: Occasionally Connected Systems

Conflicts & tracingWhat are conflicts

ErrorsConflicts

ApplyChangesFailed event to handle conflictsConflictTypeApplyActionException

Enabling transport level tracingWCF tracing, Service trace viewer toolDatabase Profiler

Page 14: Occasionally Connected Systems

Conflict resolution & tracingRahul MaratheConsultantMicrosoft Global Services India

demo

Page 15: Occasionally Connected Systems

question & answer

Page 16: Occasionally Connected Systems

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