I think Windows Mobile Data Synchronization Solution

Source: Internet
Author: User
It seems that it has been another period of time before the previous blog, and this period of time should be a struggle. It took nearly three weeks from the process of searching for synchronization errors to using new solutions, I think it is necessary to summarize this experience.

The project was developed using C # + vs2008, and the client data storage adopts SQL Server compact Edtion 3.5, mainly intended to be applied to the Windows Mobile 5.0 operating system and above mobile phones. For data synchronization between the client and the server, we initially discussed several methods, including RDA, merge replication, and WebService writing XML files or sqlce. Although RDA is simple and flexible to use, it is the first to give up because it does not have a conflict handling mechanism and tracks incremental changes. webService writes XML files or sqlce. We roughly estimate that there are no thousands of rows except for creating other tables.CodeThis leaves us with the aim of fast development. In addition, we cannot guarantee the efficiency of using WebService to write XML. Therefore, we chose less code and complicated configuration merging and replication.

ProgramIt took about a month for the development, and debugging on the simulator was OK. The servertool was published to the Internet, however, the error "a request to send data to the computer running IIS has failed" occurs only when it is published to the mobile phone, because the development result is being displayed to the lead, however, this error is unexpected. It indicates that the data connection times out. Of course, there are many reasons for the data connection times out, and the process of searching for this cause is even more frustrating. At first, I thought it was caused by network connection timeout. I deleted only one data record, but still encountered an error. Therefore, the reason is due to the permission granted by IIS to access users. In this way, you can set the maximum permissions for snapshots, copies, and virtual directories. Or error. Finally, the reason is the configuration process of merging and copying, So I re-configured the merging and copying, or this error. No, RDA is used in the middle for data synchronization, but this error still occurs on the mobile phone. Later, a colleague connected his cell phone to the home network, randomly stored the program, and found that he could. So I finally found the source of the error lies in the proxy access method of cmwap.

Baidu's GPRS network found that China Mobile provided two ways to access the Internet, one is cmwap, using 10.0.0.172: 80 proxy server. This method has some limitations. First, only applications that meet the following conditions can work normally in China Mobile's cmwap access mode. 1. network requests of applications are based on the HTTP protocol; 2. Applications Support HTTP Proxy protocol or WAP gateway protocol. Another method is cmnet. There is no restriction on this method. We can access various types of websites at will just like accessing the Internet on our ordinary PC. However, the disadvantage of this method is that the Internet thief is expensive, on our side, the price is 20 RMB and 50 MB per month. If the price exceeds 3 points/K, we can say that it is better to say that the price exceeds... For example, if a song is 4 m, you have to pay 4*30 = 120 yuan for the extra one. It seems that we cannot force our users to use this method to access the Internet. We can only seek other solutions.

I don't know if other friends have successfully synchronized data using the combined copy. I forgot to add a condition that cmwap is used for Internet access. At least I failed. I posted help on major forums and sent crazy emails to well-known windowmobile experts in China. Even my colleagues translated the questions into English and sent them to the window mobile team, however, I am not satisfied with the answer. Here I also feel that Windows Mobile apps are too few in China, Maybe limited to mobile networks in China.

Hope this articleArticleThis helps you with the same problem. Fortunately, we have now found our alternative solution, that is, using the sync Service recently launched by Microsoft. Because WebService is used as the proxy middle layer, cmwap restrictions are solved. In future articles, I will introduce my experiences on this framework and feel that the speed is acceptable. During the first synchronization (including the table structure and), it took 35 S, and the normal synchronization was 12 ~ Between 13 s, of course, this data is only for reference. Different mobile phones and network conditions are different.

PS: It seems that the translation of the preceding merge and copy is written in white. Actually, it is not because our synchronization solution does not necessarily use mobile networks, such as desktop applications, it depends on the application.

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.