最终以简单的英语保持一致 [英] Eventual consistency in plain English

查看:100
本文介绍了最终以简单的英语保持一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常在有关NoSQL,数据网格等的不同演讲中听到最终的一致性. 似乎最终一致性的定义在许多来源中都不同(甚至可能取决于具体的数据存储).

I often hear about eventual consistency in different speeches about NoSQL, data grids etc. It seems that definition of eventual consistency varies in many sources (and maybe even depends on a concrete data storage).

任何人都可以简单地解释一下什么是最终一致性,但与任何具体的数据存储都不相关?

Can anyone give a simple explanation what Eventual Consistency is in general terms, not related to any concrete data storage?

推荐答案

最终一致性:

  1. 我看了天气预报,得知明天要下雨.
  2. 我告诉你明天要下雨.
  3. 你的邻居告诉他的妻子,明天要晴天.
  4. 您告诉邻居明天要下雨.

最终,所有服务器(您,我,您的邻居)都知道真相(明天将要下雨),但是与此同时,客户(他的妻子)走了,认为这将是晴天,甚至尽管她询问一台或多台服务器(您和我)是否具有最新的价值.

Eventually, all of the servers (you, me, your neighbor) know the truth (that it's going to rain tomorrow), but in the meantime the client (his wife) came away thinking it is going to be sunny, even though she asked after one or more of the servers (you and me) had a more up-to-date value.

与严格一致性/ACID合规性相反:

As opposed to Strict Consistency / ACID compliance:

  1. 您的银行余额为$ 50.​​
  2. 您存入$ 100.
  3. 可从任何地方的任何ATM机查询的银行余额为$ 150.
  4. 您的女儿用您的ATM卡提取$ 40.
  5. 可从任何地方的任何ATM机查询的银行余额为$ 110.

您的余额在任何时候都无法反映出您在那一刻之前在帐户中进行的所有交易的实际金额.

At no time can your balance reflect anything other than the actual sum of all of the transactions made on your account to that exact moment.

原因 的原因是,为什么如此之多的NoSQL系统最终具有一致性,是因为它们实际上都是设计为分布式的,而对于完全分布式的系统,则存在超线性开销保持严格的一致性(这意味着您只能在事情开始放缓之前就进行扩展,而在这种情况下,您需要以成倍的速度将更多的硬件投入该问题以保持扩展).

The reason why so many NoSQL systems have eventual consistency is that virtually all of them are designed to be distributed, and with fully distributed systems there is super-linear overhead to maintaining strict consistency (meaning you can only scale so far before things start to slow down, and when they do you need to throw exponentially more hardware at the problem to keep scaling).

这篇关于最终以简单的英语保持一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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