# [分布式系统] 什么是分布式系统BASE理论简介说明

https://en.wikipedia.org/wiki/Eventual_consistency

Eventually-consistent services are often classified as providing BASE semantics (basically-available, soft-state, eventual consistency), in contrast to traditional ACID (atomicity, consistency, isolation, durability)

• Basically available : reading and writing operations are available as much as possible (using all nodes of a database cluster), but might not be consistent (the write might not persist after conflicts are reconciled, and the read might not get the latest write)
• Soft-state : without consistency guarantees, after some amount of time, we only have some probability of knowing the state, since it might not yet have converged
• Eventually consistent : If we execute some writes and then the system functions long enough, we can know the state of the data; any further reads of that data item will return the same value

## 简介

base理论是在cap理论的基础上发展的，cap描述了分布式系统中数据一致性，可用性，分区容错性之间的制约关系。当你选择其中两个的时候，就不得不对另外一个做出一定的牺牲。

base理论则是对cap理论的实际应用，也就是在分区和副本存在的前提下，通过一定的系统设计方案，放弃强一致性，实现基本可用，这是大部分分布式系统的选择。在这个前提下，如何把基本可用做到最好，则是我们追求的目标。

BASE换个角度理解的话，就是在保障CAP中AP可用的情况下，尽可能的保障C。

### 相关资料

Eventual Consistency Today: Limitations, Extensions, and Beyond: How can applications be built on eventually consistent infrastructure given no guarantee of safety?

https://dl.acm.org/doi/10.1145/2460276.2462076

BASE: An Acid Alternative: In partitioned databases, trading some consistency for availability can lead to dramatic improvements in scalability.

https://dl.acm.org/doi/10.1145/1394127.1394128

Principles of Eventual Consistency

https://www.nowpublishers.com/article/Details/PGL-011

Understanding Eventual Consistency

https://www.microsoft.com/en-us/research/publication/understanding-eventual-consistency/

Eventually consistent

https://dl.acm.org/doi/10.1145/1435417.1435432

https://www.researchgate.net/publication/335106736_Eventually_Consistent

### CAP的延伸发展

BASE理论就是这一思考过程的一种理论研究。

BASE 理论是一种处理分布式事务的思想，没有具体的操作步骤，也就是说他并不是具体的算法。

BASE 理论是对 CAP 中一致性和可用性权衡的结果，它来源于对大规模互联网分布式系统实践的总结，是基于 CAP 定理逐步演化而来的。

BASE 理论主张通过牺牲部分功能的可用性，实现整体的基本可用，也就是说，通过服务降级的方式，努力保障极端情况下的系统可用性。

### 再说一致性

转载务必注明出处：程序员潇然，疯狂的字节X，https://crazybytex.com/thread-247-1-1.html

### 文章被以下专栏收录:

疯狂的字节X

• 目前专注于分享Java领域干货，公众号同步更新。原创以及收集整理，把最好的留下。
包括但不限于JVM、计算机科学、算法、数据库、分布式、Spring全家桶、微服务、高并发、Docker容器、ELK、大数据等相关知识，一起进步，一起成长。

[若依]微服务springcloud版新建增添加一个
[md]若依框架是一个比较出名的后台管理系统，有多个不同版本。
[CXX1300] CMake '3.18.1' was not