Data synchronization protocol for embedded systems -- SyncML overview

Source: Internet
Author: User
Article title: SyncML, a data synchronization protocol for embedded systems. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   1 SyncML protocol description
???? At present, mobile computing and communication devices are popular mostly because they have some convenient functions. for example, they can send information to other users as needed, you can use your handheld devices to access and execute applications anytime, anywhere, and even obtain and update information during flight.
  
???? The ability to run applications and process information on a handheld device, and to synchronize updates of applications and information to devices in the office or on the Internet is widely used and popular in offline computing. is a key.
  
???? Unfortunately, two other methods have not been implemented so far:
  
Supports network data synchronized from any mobile device
Mobile devices that support human and network data synchronization
???? In this way, you need to add a lot of protocols for mobile devices to synchronize different and as much data as possible, each of these protocols only applies to the transmission and operation of a selected subset of devices and can access part of network data, the absence of a single Synchronization Standard creates many problems for end users, device manufacturers, application developers, and device providers
  
???? SyncML is a new standard. to develop a simple and general data synchronization protocol that can be used in the industry, IBM, Lotus, Motorola, Nokia, Palm Inc, Psion, and Stafish Software promote this standard. Other companies and enterprises are constantly supplemented. 1.1 Advantages of universal synchronization protocol
???? Next let's take a look at the benefits of data synchronization protocols suitable for the industry for each group of roles.
  
1. End User: Today, mobile device users may use different synchronization products on each device. In this way, there will be a program used to synchronize files between the laptop and network data, the other is used to synchronize the calendar of the handheld computer, as well as remote email access, each technology can only be used to synchronize a few applications or be restricted to special types of network connections. This arrangement is expensive to install, complicated to configure and operate, and expensive to manage. With SyncML, you can purchase devices that can use a wide range of data types.
  
2. device manufacturer: when each device manufacturer wants to support this technology that supports data access by all users and service providers. In fact, a device supports a data synchronization technology. This option forces manufacturers to compress storage space, memory, power usage, and consumption. Device manufacturers will benefit from generic protocols that enable devices to use a wide range of applications, services, networks, and transmission technologies together.
  
3. service providers: service providers that are entering the rapidly growing application stage are very concerned about this phenomenon, that is, the increase in synchronization technology will make it impossible to expand users and support users at an effective cost. Service providers now support a certain range of data types and devices in applications. you must also install and configure the infrastructure for multiple services, maintain and support these infrastructures, and ensure compatibility and performance. Currently, we can choose to use a separate data connectivity solution, which is a private solution that avoids close integration. Using SyncML will make it possible to provide connections that support a wide range of applications.
  
4. Application Developers: selecting to support multiple synchronization technologies can enable applications to support more device types and network data. However, such selection is a waste. To maintain downward compatibility, developers lose the flexibility to select a network data warehouse, which also increases the consumption of program development and the complexity of the final product. The complex network data warehouse is an obstacle to the installation and adoption of service providers. With SyncML, you can develop applications that can connect more device sets and network data.
  
1.2 description of universal synchronization protocol
???? The target of universal synchronization protocol is universal. the two ends of synchronization can be of any type and on any network:
  
Synchronize network data with any mobile device
Synchronize data between a mobile device and any network
  
???? The data synchronization protocol synchronizes network data and many different devices, including handheld computers, mobile phones, automated computers, and desktop computers. A user can access and operate the same data set on different devices. for example, you can use a handheld device or mobile phone to read emails, A consistent and updated record can also be maintained.
  
???? Similarly, the synchronization ends can use any type, which allows mobile devices to support more data types, including email, calendar, transaction management information, enterprise data in the database, and Web documents. This feature allows users who want to receive orders via email to access the company's directory listing system on the same device to determine the delivery date.
  
???? To achieve this goal, the protocol requires the following features:
  
It can operate on both wired and wireless networks effectively.
Supports multiple transmission protocols
Support any network data
Accessible by multiple applications
Considering the resource restrictions of mobile devices
Built on existing global Internet and Web technologies
The minimum protocol function is to grant the most common synchronization capabilities to all devices.
   
   2 SyncML underlying communication
2.1 bind Http
  
2.1.1 Tcp transmission service
  
???? Http communication is generally over Tcp connections. this binding is not required. if Http is based on other protocols, the requirements are similar to the following Tcp definitions.
  
2.1.1.1 connection
???? When the Http client is connected to the Http server, the SyncML client establishes a Tcp connection between the client and the server by using the Tcp open operation. in case of timeout, the SyncML client also needs to establish a new connection.
  
2.1.1.2 connection options
???? Some options about the port and protocol version.
  
2.1.1.3 disconnect
???? When the connection is not required, the SyncML client uses the tcp close operation to end the connection. If a fixed connection exists in an Http request, the closure of the Http connection is completed by an Http client. when the Http client receives an Http response from the server, it indicates that this is the last SyncML package.
  
2.1.1.4 termination
???? In some cases, the application may interrupt the Tcp connection when an abnormal time occurs. in this case, the Tcp is re-initialized to end the current connection.
  
2.1.1.5 timeout
???? When the server times out, The SyncML client needs to re-create a new HTTP session and the Http server will try to re-send the current SyncML package
  
2.1.2. SyncML Information Exchange
???? Once an Http connection is established, one or more SyncML messages are transmitted by the SyncML client through the connection. these messages exist in the Http client request or Http server response.
  
???? The POST method in an Http request is used to transmit SyncML messages.
  
2.1.2.1 one message per packet
???? The following is part of the Http request code:
POST./servlet/syncit HTTP/1.1
Host: www.datasync.org
Content-Type: application/vnd. syncml-xml; charset = "UTF-8"
Content0Length: 1023
Accept: application/vnd. syncml-xml
  
???? The following is part of the Http response code:
HTTP/1.1 200 OK
Content-Type: application/vnd. syncml-wbxml; charset = "UTF-8"
Content-LengthL 1, 1023
-- HTTP body ---
  
  
2.1.2.2 a package contains multiple messages
???? Each Sync message must be transmitted in an HTTP request or response using the SyncML MIME media type. when there are multiple SyncML messages in each package, whether a message is transmitted in a separate HTTP request or response depends on whether it is a SyncML request and response. You can determine whether there are more SyncML messages in the package based on whether each SyncML message has the last element. if the last element exists, the message is the last message in the package.
  
2.1.3 Transmission commands
???? HTTP uses a series of commands, including transmission methods, header information, request header information, and response header information.
  
2.1.3.1 transmission method
???? The SyncML client must use the POST method or CONNECT method (if supported) to send SyncML requests to the SyncML server. The CONNECT method is used to initialize an SSL session to verify the HTTP client and server. Other methods are not used on the SyncML client currently.
  
2.2 bind Obex
  
2.3 bind Wsp
  
   3 SyncML synchronization protocol
3.1 motivation:
  
Indicating that the protocol is not enough to achieve information interaction
Data in multiple formats can be transmitted between multiple devices.
  
3.2 Design principles
  
Meeting network latency needs
Various devices
Meet various existing storage modes
Meets multiple security requirements
Multiple usage modes
  
3.3 Sync type
3.3.1 bidirectional synchronization
  
Bidirectional transmission of information between the client and the server
In special cases, Slow sync is used as the transmission mode.
3.3.2 client one-way synchronization
  
Only the client proposes the modification information
In special cases, data can be output
3.3.3 server-side unidirectional synchronization
  
Modification Information is only proposed by the server.
In special cases, data can be input
3.3.4 server announcement
  
Synchronization requests are sent from the server to the client.
3.3.5 bidirectional synchronization example
  
Synchronous transmission of calendar
Client authentication request accepted
The client sends two messages
The server sends a message.
Data consistency between the server and the client will be completed immediately
???? The following is an example of the general process of synchronous transmission. There are seven synchronous transmission methods. the following example shows two-way transmission, the most complex one. First, make initial preparations, then transmit and confirm.
  
3.3.5.1 the client sends a synchronization request
<SyncML>
It is equivalent to the synchronized header file, basically in fixed mode.
<SyncHdr>
<VerDTD> 1.0 </VerDTD>
<VerProto> SyncML/1.0 </VerProto>
<SessionID> 1 </SessionID>
<MsgID> 1 </MsgID>
The value of synchronization initialization is one, which is equivalent to the first round.
Target address
<Target> <LocURI> http://www.syncml.org/sync-server </LocURI> </Target>
SOURCE address
<Source> <LocURI> IMEI: 493005/10/059280/0 </LocURI> </Source>
Authentication
<Cred> <! -- The authentication is optional. -->
Authentication mode
<Meta> <Type xmlns = 'syncml: metinf '> syncml: auth-basic </Type> </Meta>
Equivalent to password
<Data> dXNlcmlkOnBhc3N3b3Jk = </Data> <! -- Base64 formatting of "userid: passw
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.