Best practices in syncing data

江枫思渺然 提交于 2019-12-13 13:16:18

问题


Context

A mobile application can add/edit/delete a customer in it's own offline database. A web application can also add/edit/delete a customer in the master database on a web server. The mobile application will try to sync it's database with the master database every X hours, provided it has an internet connection available.

Case

  1. Mobile application edits customer A in its offline database
  2. Web application edits customer A in the master database
  3. Mobile application gains access to internet and syncs its offline database with the master database.

Question

How should the system handle the two versions of the data? The version of the Mobile application is older than the version of the Web application but overwriting everything edited by the mobile application with the data from the web application seems not very user friendly.

I'm looking for information/best practices on how to solve known versioning/syncing problems with data. I'm not interested in technologies who can assist in this. I want to understand the solutions before jumping blindly into a promising versioning tool.


回答1:


I thought about this a lot and created a project... The documentation for it is detailed and explains why and how... It may help, or at least give you things to think about.

https://github.com/forbesmyester/SyncIt



来源:https://stackoverflow.com/questions/28797992/best-practices-in-syncing-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!