33
Content Content Synchronization Synchronization T T - - 110.5120 Next generation wireless networks 110.5120 Next generation wireless networks Helsinki University of Technology Helsinki University of Technology Jin Jin ZhiHua ZhiHua (77168L) (77168L) Chia Chia PernHui PernHui (771 (771 46H 46H ) )

Content Synchronization - cse.tkk.fi · Content Synchronization ... – Data, metadata, commands – Binary coding based on WBXML to reduce data size ... acquired by Nokia in Feb

Embed Size (px)

Citation preview

ContentContentSynchronizationSynchronization

TT--110.5120 Next generation wireless networks110.5120 Next generation wireless networks

Helsinki University of TechnologyHelsinki University of TechnologyJin Jin ZhiHuaZhiHua (77168L)(77168L)

ChiaChia PernHuiPernHui (771(77146H46H))

2006-11-21 2

OverviewOverview• Introduction

– Why do we need sync ?

– What Sync is about ?

– Current Sync Solutions

• Open Standardization– SyncML

– OMA Data Sync Working Group

– OMA SyncML Common Spec

– OMA Data Sync Protocol

• Comparison on various Sync Protocols

2006-11-21 3

IntroductionIntroduction

2006-11-21 4

Why do we need Sync?Why do we need Sync?

• Multiple copies of data to allow user mobility

– Data is modified independently

– Mobile device is not always connected

• Synchronization as a weaker form of consistency

• Application: Email, File or Web Content Distribution,

Personal Information Management (PIM) e.g.

calendar, task, contact, etc

2006-11-21 5

What Sync is aboutWhat Sync is about

• Synchronization Type

One Way File or web content replication from central server to other servers e.g. web cache proxy

Two Way Data being updated at both central server and local storage e.g. email

Slow Sync All data is compared and synchronized, usually performed during 1st sync or when change detection is not feasible

Fast Sync Delta synchronization: Only changes since last synchronization are exchanged

2006-11-21 6

• Client-Server Architecture

– Resource constraints on mobile device: memory, processing speed, power, bandwidth

– Computation, change detection, conflict resolution at Server

– Increased Manageability

Change DetectionStatus flag / change log

Timestamp

Algebraic Set Reconciliation

Conflict resolution

Client always wins

Server always wins

Latest change wins

Merging conflict

Data duplication

What What SyncSync is about (2)is about (2)

2006-11-21 7

What What SyncSync is about (3)is about (3)• Sync protocol

– Defines the sync communication process

• Sync representation– Defines the data format used during the sync process

• Local Synchronization– Serial cable, infrared, Bluetooth

– Sync with desktop or other mobile device

• Remote Synchronization– Cellular network, WLAN

– Sync with web based (centralized) server

2006-11-21 8

Current Sync SolutionsCurrent Sync Solutions• Low Interoperability

– Different proprietary protocols

each functioning only on a very

limited number of devices,

systems and data types

• Drawbacks

– Complicated task for users,

manufacturers, service providers

and developers

– Restricted data access and

delivery

– Limited user mobility

• Various proprietary protocols

2006-11-21 9

Current Sync Solutions (2)Current Sync Solutions (2)

• Open Sync Standard:

SyncML

• Supports in industry

– FusionOne

– FUNAMBOL

– Voxmobili

– SYNTHESIS AG

– Synchronica plc

2006-11-21 10

Towards an Towards an Open Standard Open Standard

2006-11-21 11

SyncMLSyncML• SyncML Initiative, Ltd.

• Open spec. for

– Representation Protocol

– Synchronization Protocol

– First release in 2000

• Unified standard, High interoperability

• Data type and data storage independent

• Transport independent (any bearers such as HTTP, WSP, OBEX, etc)

• Change log based

2006-11-21 12

SyncMLSyncML (2)(2)

• SyncML Framework

From Ref[3] Figure 2 SyncML Framework

2006-11-21 13

Open Mobile Alliance (OMA)Open Mobile Alliance (OMA)• Founded in 2002

• Dedicated to

– Mobile service specification work

– Stimulating and contributing to the creation of interoperable services

• To facilitate communications

– Between any DEVICE

– On any PLATFORM

– In any SERVICE

– Over any NETWORK

• Over 340 industry members

2006-11-21 14

OMA Data Sync Working GroupOMA Data Sync Working Group

From Ref[3] Figure 1 OMA SyncML Specification Structure and Relationships

2006-11-21 15

OMA OMA SyncMLSyncML Common SpecCommon Spec• Representation protocol

• Based on XML(DTD)

– Data, metadata, commands

– Binary coding based on WBXML to reduce data size

• Must work together with

– OMA Data Sync Specs

• To sync any device with any device

• To sync over any network

• To sync with any networked data

– OMA Device Management Specs

• To enable third parties (wireless operators, service providers, corporate information management department, etc.) to carry out the difficult procedures of configuring mobile devices on behalf of the end users

2006-11-21 16

OMA Data Sync ProtocolOMA Data Sync Protocol

• Symmetric– To sync networked data with any mobile device

• Handheld computer• Mobile phone• Automotive computer• Desktop PC

– To sync a mobile device with any networked data• Email• Calendar• Contact management information• Enterprise data stored in database• Documents on the web

2006-11-21 17

OMA Data Sync Protocol (2)OMA Data Sync Protocol (2)• SyncML Message (conforming to the DTD)

– A set of messages for certain operation (client modifications,

initialization, etc) form a conceptual SyncML Package

– Each message is a complete XML document

• SyncHdr (routing and versioning info)

• SyncBody (SyncML Command)

– Message size could be limited (E.g., by bearer)

• Using messages to carry sync info between SyncML client

and server (such as device capabilities, command, status

info, data object, etc.)

2006-11-21 18

OMA Data Sync Protocol (3)OMA Data Sync Protocol (3)

• 3 phases in a sync

process

– Initialization

• Negotiate

capabilities between

client and server

• Negotiate sync type

(two-way sync

required by default)

• Authentication

– Exchange modified

data

– Update ID mapping

From Ref[3] Figure 8 MSC of Two-Way Sync

2006-11-21 19

OMA Data Sync Protocol (4)OMA Data Sync Protocol (4)

• ID mapping– Long in server but short in client

– GUID for server, LUID for client

– Server maintains the mapping between GUIDs and LUIDs

From Ref[3] Figure 5 Example: ID Mapping of Data Items

2006-11-21 20

OMA Data Sync Protocol (5)OMA Data Sync Protocol (5)

• Mechanism for conflict resolution is not covered

• Conflict resolution is domain-specific

• Only define the format of conflict status

– Status code for conflict types (delete, update, etc.)

– Status code for conflict resolving result (server/client

win, merge, copy, etc.)

2006-11-21 21

Comparison of various Comparison of various Sync Protocols Sync Protocols

2006-11-21 22

1. ActiveSync1. ActiveSync

• Microsoft proprietary protocol

• Local sync with Windows PC to reconcile Outlook

information, Office documents, pictures, music,

video, etc

• Remote sync with Microsoft Exchange Server for

Email and PIM data

• To be replaced by Windows Mobile Device Center

in Windows Vista

2006-11-21 23

2. HotSync2. HotSync• Palm Proprietary Protocol

• Local sync for PIM data, photos, music, preferences & settings, application installation

• Fast Sync– Status flags to keep track of changes

• Slow Sync – All data records are sent to desktop

– Performed if device is not last sync with this desktop; inevitable when sync with multiple device

– Communication bandwidth and computation time increase linearly with no. of records on the device

• Palm will abandon HotSync to embrace SyncML

2006-11-21 24

3. 3. IntellisyncIntellisync• Pumatech; acquired by Nokia in Feb 2006

• Corporate solution

– Email, PIM data

– Role based file or web content distribution within company

– Application installation or update

• Wide compatibility with Outlook, Exchange Server, Lotus Domino, Palm PDA, PocketPC, Symbian handheld, etc

• All devices remote sync with a centralized server

• Capable of fast sync with multiple device with the centralized server

• Single point of failure / traffic congestion

2006-11-21 25

4. 4. SyncMLSyncML

• Capable of fast sync with multiple

device through peer-to-peer connections– Each device maintains status flags for each record

against every other device on the sync network

– Massive memory requirement

• Consider a network of 20 devices, each with 10000 records. If A record is represented by 8 bytes metadata, memory required per device would exceed 1 MB

• Worse in a dynamic network

2006-11-21 26

5. 5. CPISyncCPISync ?• Characteristic Polynomial Interpolation Sync

• Algebraic set reconciliation

• Future technology for dynamic peer-to-peer multi-device

synchronization settings

– No maintenance of status flags

– Low bandwidth requirement

• O(n3) computation growth with number of differences

• Better performance against slow-sync

• Research at Boston University; not in industry yet

2006-11-21 27

• CPISync Algorithm

– Records could be identified by a set of integer {i1,i2,…,in}

– A characteristic polynomial f(z) to describe all records,

f(z)=(z-i1).(z-i2)…(z-in)

– Consider 2 hosts A and B, we have

fA(z)=(z-iA1).(z-iA2)…(z-iAn)

fB(z)=(z-iB1).(z-iB2)…(z-iBn)

– We could solve for f∆A/f∆B using a generalized Vandermondesystem of equations

fA(z) f∆A(z)

fB(z) f∆B(z)

– The numerator and denominator of f∆A/f∆B determine the

differences between A and B

=subset of {i} not in B

subset of {i} not in A

5. 5. CPISyncCPISync (2)(2)

2006-11-21 28

Records, iA={1,2,4,16,21}

Characteristic Polynomial, fA(z)

=(z-1).(z-2).(z-4).(z-16).(z-21)

Evaluation of fA(z) at {-1,-2,-3,-4}

={69,12,60,61}

z -1 -2 -3 -4

fA(z) 69 12 60 61

45

55

fB(z) 1 7 60

fA/fB 69 22 1

Records, iB={1,2,6,21}

Characteristic Polynomial, fB(z)

=(z-1).(z-2).(z-6).(z-21)

Evaluation of fB(z) at {-1,-2,-3,-4}

={1,7,60,45}

Send values {1,7,60,45} to A

The zeros of numerator and denominator

are {4,16} and {6} respectively. Hence

{4,16} is not in B and {6} is not in A.

Use the generalized Vandermonde

system to derive f∆A/f∆B

f∆A/f∆B=z2+51z+64

z+65

A

B

Send record {6} to ASend records {4,16} to B

5. 5. CPISyncCPISync (3)(3)

• Note that all arithmetic

operations are performed in finite field F71

2006-11-21 29

CPISyncCPISync vsvs Slow SyncSlow SyncTime against difference size

(fixed total size = 10, 000 records)

From Ref[4] Figure 6From Ref[4] Figure 5

Time against database size(fixed difference size)

2006-11-21 30

Scalability Comparison

From Ref[5] Figure 7

2006-11-21 31

ConclusionConclusion

• Sync protocol should be standardized?

– End users: We love it!

– Wireless operators: Great! But …

– Device manufacturers: Why not mine?

• Antitrust against monopoly in mobile industry

• Next generation data sync requires more elegant solutions

such as algebraic set reconciliation (e.g., CPISync)

• Industry should support sync research in the academics to

produce practical results

2006-11-21 32

ReferencesReferences[1] Sudhir Dixit and Tao Wu, “Content Networking in the Mobile

Internet”, Hoboken, N.J Wiley cop. 2004[2] OMA SyncML Representation Protocol (Candidate Version 1.2

– 09 May 2005), OMA-SyncML-RepPro-V1_2-20050509-C[3] OMA DS Protocol (Approved Version 1.2 – 10 Jul 2006), OMA-

TS-DS_Protocol–V1_2-20060710-A[4] David Starobinski, Ari Trachtenberg, and Sachin Agarwal,

“Efficient PDA Syncronization”, IEEE Transactions on Mobile Computing, Vol. 2, No. 1, Jan-Mar 2003

[5] David Starobinski, Ari Trachtenberg, and Sachin Agarwal, “On the scalability of Data Synchronization Protocols for PDAs and Mobile Devices”, IEEE Network, Jul/Aug 2002

[6] Matthew Denny and Michael J. Franklin, “Edison: Database-Supported Synchronization for PDAs”, Distributed and Parallel Databases, Kluwer Academic Publishers, Netherlands, 2004.

2006-11-21 33

Thank you!!!Thank you!!!