duration : 5.30 nights, 9:30 ~ 11:30
topic : Discussing the technology selection and implementation of data synchronization between Android app and server
participants : Chen Shaoting, Chih, Wu She Qing
what to discuss :
Gross analysis
Regarding data synchronization, there are two parts on the whole, user authentication and data synchronization. We do not check the user identity authentication problem, and mainly find the solution of data synchronization problem.
Synchronization problems, roughly divided into these parts: server-side technology selection, Android data selection, transmission protocol, synchronization strategy.
Server-Side Technology selection
About the language, because everyone is not interested in learning PHP python, and Java is the general choice of Android development, the data is more, so we chose Java.
To use Java, the servlet is almost certainly used. So we're still following the routine, choosing the servlet container tomcat to provide services.
For the database selection, we also chose the regular MySQL.
With regard to how to store user data, our current idea is to create a separate directory for each user, similar to Android in the directory, creating a user's own database and saving the user's multimedia files.
Android Data Selection
Google has a framework called Sync adapter, which supports automatic background synchronization and manual synchronization, and supports authentication. Of course, the specific authentication method and synchronous communication method or we have to write our own, but it is more convenient after all.
Data Transfer Protocol
Because Tomcat has a good encapsulation of HTTP, we intend to use the HTTP protocol to transfer data.
Multiple key values for each table item in the database are encapsulated using XML, and the multimedia file is split into smaller chunks. (Want to use FTP 23333 Why do I have to write a file Transfer Protocol (this is just a blog person suddenly skin a bit)) more specific agreement is not determined.
Synchronization policy
At the very back because we didn't discuss it.
We think of a lot of strategies, such as using the flag to indicate the synchronization state, using timestamp to indicate the last synchronization time, etc., but there always seems to be a bug. So we decided to take a look at the information and decide.
(I don't know why)
(the person who wrote the blog felt that three people were not enough to complete such a difficult task, to get a few people to help)
Chen Shaoting: Responsible for the server-side database part of the building, code writing
Chih: Responsible for the server-side network, communication parts of the building, code writing
Wu She Qing: Responsible for Android code writing
Database group Nth Sub-session