问题描述
有,尽管CAP定理。这是怎么可能的? CAP定理与(可能/不可能)是ACID之间的关系是什么?
There are NoSQL ACID (distributed) databases, despite CAP theorem. How this is possible? What's the relation between CAP theorem and (possible/not possible of) being ACID?
推荐答案
CAP定理实际上有点误导。事实上,您可以拥有一个CA设计是废话,因为当发生分区时,您必须有一致性(例如数据同步问题)或可用性(延迟)的问题。这就是为什么有一个更准确的定理,说明:
CAP theorem is actually a bit misleading. The fact you can have a CA design is nonsense because when a partition occurs you necessarily have a problem regarding consistency (data synchronization issue for example) or availability (latency). That's why there is a more accurate theorem stating that :
在分布式系统中的分区 / strong>和可用性。
During a partition in a distributed system, you must chose between consistency and availability.
仍然在实践中并不那么简单。您应该注意,一致性和可用性之间的选择不是二进制的。你甚至可以有一定程度的两者。例如,关于ACID,您可以使用NoSQL进行原子和持久的事务,但是会丧失一定程度的隔离和一致性以实现更好的可用性。可用性可以被同化为延迟,因为您的响应时间将取决于几个因素(是最近的服务器可用吗?)。
Still in practice it is not that simple. You should note that the choice between consistency and availability isn't binary. You can even have some degree of both. For example regarding ACID, you can have atomic and durable transactions with NoSQL, but forfeit a degree of isolation and consistency for better availability. Availability can then be assimilated to latency because your response time will depend on several factors (is the nearest server available ?).
因此,为了回答你的问题,营销胡说。
So, to answer your question, this is usually marketing bullshit. You need to actually scratch the surface to see what the solution is exactly gaining and forfeiting.
如果你想要更深入的解释,你可以看看,或。
If you want deeper explanations you can look here, here or here.
这篇关于CAP定理是否意味着ACID不可能用于分布式数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!