Top Banner
© Oxford University Press 2007. All rights reserved. 1 Data Synchronization in Mobile Computing Systems Lesson 08 SyncML Language Features
45

Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ......

Jun 16, 2018

Download

Documents

vuongxuyen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 1

Data Synchronization in Mobile Computing Systems

Lesson 08SyncML Language Features

Page 2: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 2

A mobile computing system

• Consists of (i) mobile device, (ii) personal area computer in a WPAN, a computer connected by WLAN, or Internet, (iii) nearby devices, for example, printer, and (iv) mobile service provider connected by wireless

Page 3: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 3

A mobile computing system

• In general, each of the devices can use different platforms

• One device may use Symbian OS, another Palm OS, and the computer on WLAN Windows OS

• Also, each one can use different languages

• For example, a device may use Java and the computer C/C++

Page 4: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 4

Use of SyncML Language

• Database connector for SyncML-based mobile application synchronizes data at the device with any relational database

• SyncML-based software synchronizes data for PIM (email, calendar, memo, tasks-to-do list, or contacts list)

Page 5: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 5

JCF (Jataayu client framework)

• A client framework to enable functioning of the software on different platforms

Page 6: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 6

Use of SyncML client and SyncML engine

• APIs for PIM, email, and customized device application can deploy SyncML client and SyncML engine

• SyncML server for sending response to the requests from the other node, computer, or device

• Sends the messages which accompany the data and the operational results as per the messages

Page 7: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 7

SyncML (Synchronization Markup Language)

• A data synchronization language based on XML (Extensible Markup Language)

• In other words, it is a markup language used for writing the codes for interfaces used for synchronization between the mobile devices and the server

Page 8: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 8

XML Base of SyncML

• A language for marking up a given text with tags and attributes and it is extensively used in mobile computing

Page 9: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 9

Example of XML codes

• <search_list> • …• <!- - Contact information about contacts

identified by first alphabet as R - - > • <alp_name first_character = “R”> • <contact_name> • Raj Kamal • <address> ABC Street, …. </address>• <telnumber> 9876543210 </telnumber>• </contact_name>

Page 10: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 10

Example of XML codes

• <contact_name> • Raveena• <address> XYZ Street, …. </address>• <telnumber> 9848543210 </telnumber>• </contact_name>• </alp_name>• …• </search_list

Page 11: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 11

Comments in XML

• Comments are not used in parsing (processing) of the codes.

• XML comments start with <!- - (less than sign, ! sign and two dashes) and ends with - - > (two dashes before the greater than sign)

Page 12: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 12

Start and last tags for writing the text of a search list in between the tags

• The start tag starts with < sign• Followed by a tag name which is

search_list in this case• ends with > sign• The last tag starts with <, followed by a

slash sign, the same tag name as at the start, and > sign

Page 13: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 13

Inner tag with attributes

• For example, alp_name with attribute specification first_character = “R”

• The coding format is < sign, tag name, tag attribute or attributes, > sign, followed by text associated with the given tag and attributes, < sign, slash sign, tag name and > sign

Page 14: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 14

Data type definitions (DTD) file

• For an XML document, there is a data type definitions (DTD) file which specifies the rules

• For example, for the document given, it specifies that search_list is the root element and that contact_name contains the address and telephone number

Page 15: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 15

XML

• A platform independent processing language

• This implies that it can be used for processing not only by Java but also by any other language

• Tags, attributes, and metadata formats in XML are standardized so that they can be universally interpreted on different platforms, machines, or networks

Page 16: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 16

SyncML and Voice XML

• SyncML an open standard based on XML. It has revolutionized mobile application-development, services, and devices

• Voice XML another language based on XML and is used for communicating voice messages

Page 17: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 17

SyncMLML based Information Exchange

• Between a client and server in form of an envelope representing a message

• Term message describes information• A tag and its attributes define an

envelope of a text message• Each envelope has a header followed by

body

Page 18: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 18

SyncML Header and Body

• The header exists between header start and end tags

• The body which includes the commandsis present between body start and end tags

• The envelope exchanged between client and server by request and response messages

Page 19: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 19

SyncML Header and Body

• SyncML message has two components(a) a header which starts with the start tag <SyncHdr> and ends with the end tag </SyncHdr> and (b) a body which starts with <SyncBody> and ends with </SyncBody>

Page 20: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 20

SyncHdr

• Consists of DTD, protocol, and data (message or session) identifications

• Includes target and source information• Carries initialization information which is

required before synchronization• The initialization information enables

device authentication and includes information on available device functions

Page 21: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 21

Example of SyncML Header

<SyncML><SyncHdr><VerDTD>1.0</VerDTD><VerProto>SyncML/1.0</VerProto><SessionID>session01</SessionID><MsgID>message09</MsgID><Target><LocURI>http://www.syncml.org/sync-

server</LocURI></Target>

Page 22: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 22

Example of SyncML Header

<!- - LocURI means local URI. URI means Universal Resource Identifier - - >

<Source><LocURI>IMEI:49…………800</LocURI></Source> < - - IMEI is International Mobile Equipment Identity represented by a number - ->

…</SyncHdr>

Page 23: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 23

Use of SyncBody

<SyncBody>…

</SyncBody></SyncML>

Page 24: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 24

SyncML used between client and server

• The accompanying data (payload) is placed between a start tag and the corresponding last tag

• SyncML can be used between client and server for sending messages and data and for synchronization as it has standard defined tags, commands and protocol for exchange

Page 25: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 25

Definition of the term Data store

• A term used in SyncML codes for persistent data storage

• It is also written as DataStore• Refers to storage of data in a file system

or database or in any other way in which persistency is maintained

Page 26: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 26

Data store

• In the context of mobile devices, persistency means that the data remains intact till deleted even if the device power is interrupted

• Implies that a change in data during an operation is simultaneously stored and reflected at all related files in file system, database, or any other record

Page 27: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 27

Example of DataStore

• Suppose a telephone number is stored in a mobile device

• The flash memory file stores it persistently and it is used in call operations

Page 28: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 28

Example of DataStore

• When user modifies the telephone number in Contacts at PIM using an API, it is also stored and modified at the flash storage and will be available any time on next call

• When user deletes the telephone number in Contacts, only then the number looses persistency

Page 29: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 29

Use of DataStore

• APIs, for example, PMI or email, use a Data store mechanism

• For synchronizing data using different Data store mechanisms at the nodes (client, database, file system, or server), with each one, in general, using different platforms and languages, is a difficult task

Page 30: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 30

SyncML

• Can be used for sending messages of the APIs and data using the Data store mechanism at both the client and server ends

Page 31: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 31

Parsing of SyncML message

• A SyncML message from SyncML client or server is used after parsing the tags, attributes and the text

• A SyncML message parsed similar to an XML document

• For example, the search list—an XML document, in Sample

Page 32: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 32

Example of Using Parser

• The parser also able to retrieve the data for the contact name, telephone number, and address

• An API at the device or server can save the data using the Data store mechanism

• An API can use the data for synchronization with another API in personal area network or at server

Page 33: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 33

Parse use by an API

• Assume that an API uses a parser and parses for contact names, then firstly the parser will parse for alphabet tag, then first character “ R”

• As a result, the parser gets the contact names with first character as the alphabet ‘R’

• A parser program associated with PIM API can be used to get a list of contact names

Page 34: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 34

Parser

• Using the document in Sample Code, an item in the list of items will befirst line: Name Raj Kamal, second line: Address ABC Street, …, and third line Phone 9876543210

Page 35: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 35

Sync ML Data Type Definitions

• SyncML, like XML, uses DTDs• These include device information DTD,

service information DTD, meta information DTD (for metadata), and main SyncML DTD

• Service information DTD represents the functional capabilities of the data objects supported by client or server

Page 36: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 36

Two-way synchronization

• If a client supports vCard version 2.1 for two-way synchronization, the server must also have this capability; otherwise the synchronization session for the vCard data object cannot proceed

Page 37: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 37

SyncML DTD

• Also exchanged with the message• SyncML defines a universal data

synchronization format DTD, which is exchanged with a SyncML message

Page 38: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 38

Metadata in Data Type Definitions

• Metadata is information regarding the stored data or it is information about information

• Like XML document, the SyncML metadata is structured data that describes various characteristics of information-carrying elements

Page 39: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 39

Data store info

• Whether Data store mechanism is database-based or file-based

Page 40: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 40

Device info

• Has information about the device capability for synchronization

• Device info consists of device type, model number, manufacturer, device hardware version specification, device software specification, and device capabilities for maintaining data copies and synchronization

Page 41: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 41

Metadata

• Helps in discovering and locating data or in its assessment

• The metadata data helps in the identification or management of data in the subsequent text data in the document

• Metadata considered as information about data or as information about information

Page 42: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 42

Open Standard Acceptability by OMA

• Initiative for universal acceptability of SyncML is a project of the Open Mobile Alliance (OMA)

• The OMA SyncML initiative came from IBM, Motorola, Nokia, Palm, Ericsson, Lotus, Starfish, and Psion

• Later many organizations joined

Page 43: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 43

Summary

• SyncML is a standard XML based language for mobile application development

• Parsing similar to XML • DataStore• SyncML DTD• Metadata

Page 44: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 44

… Summary

• Tags and attributes• Envelope • Header • Body

Page 45: Oxford University Press 2007. All rights reserved ... · Oxford University Press 2007. All rights ... Oxford University Press 2007. All rights reserved. 18 SyncML Header ... MobileCompChap09L08SynchMLlanguageFeatures.ppt

© Oxford University Press 2007. All rights reserved. 45

End of Lesson 8SyncML Language Features