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

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

问题描述

我经常在关于 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.

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

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 系统具有最终一致性,因为几乎所有的 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天全站免登陆