Does the CAP theorem imply that ACID is not possible for distributed databases?

ぃ、小莉子 提交于 2019-12-02 21:19:48

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 :

During a partition in a distributed system, you must chose between consistency and availability.

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.

The PACELC theorem extends CAP to talk about the tradeoffs even when partitions aren't happening. One of the exciting insights for distributed systems, is that they can be made partition tolerant without losing consistency, when consensus protocols such as RAFT or Paxos are used to create a transaction log. The Calvin protocol combines a RAFT log with deterministic transaction application.

FaunaDB implements Calvin, allowing it to maintain ACID transactions with strict-serializability, even during partitions or during replica failure, as long as a quorum of replicas is not partitioned.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!