同步数据的最佳实践 [英] Best practices in syncing data

查看:37
本文介绍了同步数据的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

移动应用程序可以在其自己的离线数据库中添加/编辑/删除客户.Web 应用程序还可以在 Web 服务器的主数据库中添加/编辑/删除客户.移动应用程序将尝试每 X 小时将其数据库与主数据库同步一次,前提是它有可用的互联网连接.

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.

案例

  1. 移动应用在其离线数据库中编辑客户 A
  2. Web 应用程序在主数据库中编辑客户 A
  3. 移动应用可以访问互联网并将其离线数据库与主数据库同步.

问题

系统应该如何处理这两个版本的数据?移动应用程序的版本比 Web 应用程序的版本旧,但使用来自 Web 应用程序的数据覆盖移动应用程序编辑的所有内容似乎不太用户友好.

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.

推荐答案

我想了很多,并创建了一个项目......它的文档很详细,并解释了为什么以及如何......它可能会有所帮助,或者在至少给你考虑的事情.

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

这篇关于同步数据的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆