分布式系统课程总结
- Welcome
- What Distributed Systems Are, and Why They Exist
- Read Replication
- Sharding
- Consistent Hashing
- CAP Theorem
- Distributed Transactions
- Distributed Computation Introduction
- Map Reduce
- Synchronization
- Network Time Protocol
- Vector Clocks
- Distributed Consensus: Paxos
- Messaging Introduction
- Apache Kafka
- Zookeeper
Welcome
What is a Distributed System?
A collection of independent computers that appear to its users as one computer.
Three Characteristics
- The computers operate concurrently
- The computer fail independently
- The computer do not share a global clock
个人计算机并不是一个分布式系统,虽然满足前两个条件,但共享了一个全局时钟。
Contents
What Distributed Systems Are, and Why They Exist
作者用咖啡店来类比分布式系统,一个咖啡店很好记住每个客户最中意的饮品信息,并且在客户提出修改时也很方便。但咖啡连锁店面对这些事务时就会很麻烦。
Read Replication
Read Replication 适用于读多写少的情况。
客户提出修改时
问题在于,当最开始的咖啡店变更了客户信息后,也要告知其它咖啡店。但是这个告知过程需要花费时间,就会出现信息不一致的问题(inconsistency)。
Sharding
分片,把客户按照姓名映射成三份,解决写比较多的问题。