关于我的用例的复制方案的建议? [英] Suggestion on a replication scheme for my use-case?

查看:171
本文介绍了关于我的用例的复制方案的建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个在与一个主MySQL数据库通信的多个客户端上运行的应用程序。另外,我们有一个使用相同MySQL数据库的Web应用程序。

I am working on an application that runs on multiple clients that talk to one main MySQL database. Additionally, we have a web application that uses the same MySQL database.

由于延迟问题,所有客户端都必须运行自己的本地MySQL数据库的主MySQL数据库。 Web应用程序仍然使用主MySQL数据库。

Due to latency issues, all clients will have to run their own local MySQL database which should be a copy of the main MySQL database. The web application remains to use the main MySQL database.

客户端只从表A读取,并写入表B. Web应用程序将这两个表写入表A和B 。

The clients only read from table A, and write to table B. The web application writes both to tables A and B.

如何设置一个确保数据一致性的复制方案?客户端应该可以长时间下线。这是甚至可能使用MySQL或者我更好地看看像CouchDB的东西? CouchDB似乎根据网站明确支持这一点:

How should I setup a replication scheme that ensures data consistency? It should be possible for clients to go offline for an extended period of time. Is this even possible using MySQL or am I better of having a look at something like CouchDB? CouchDB seems to support this explicitly according to the website:


它允许用户和服务器到
访问和更新相同的共享断开连接时数据
,然后
双向复制这些更改

it allows for users and servers to access and update the same shared data while disconnected and then bi-directionally replicate those changes later

(从: http://couchdb.apache.org/docs/overview.html

推荐答案

如果可以迁移到MySQL以外,CouchDB有你所需要的语义。

CouchDB has the semantics you need if it's feasible for you to move to away from MySQL.

你甚至不需要两表系统。文档系统具有内置的MVCC,因此您可以更新文档并解决冲突等。复制是非常棒的,完全点对点,并且旨在支持离线应用程序。

You wouldn't even need to "two table" system. The document system has MVCC built in so you can update documents and resolve conflicts, etc. Replication is awesome and fully peer-to-peer and intended, by design, to support offline applications.

这篇关于关于我的用例的复制方案的建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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