Paper Note: Zab: High-performance broadcast for primary-backup systems

FAQ What is the difference between receive and deliver? What does it mean by saying “Zab’s transaction log doubles as the database write-ahead transaction log” in page 3? ZooKeeper uses an in-memory database and stores transaction logs (Write-ahead log) and periodic snapshots on disk. Before a transaction is executed and its changes are applied to the in-memory database, it is first logged. This means that if the system crashes before the changes can be applied, the transaction can be replayed from the log to ensure data integrity. ...

November 15, 2023 · 4 min · KKKZOZ

Paper Note: CAP Twelve Years Later: How the "Rules" have Changed

FAQ what is a version vector? A version vector is a construct used in distributed systems to track the version of data across different nodes in a network, ensuring consistency and helping to resolve conflicts. Version vectors are particularly useful in systems where multiple nodes may independently modify data and then need to synchronize with each other without relying on a central authority. This concept is fundamental in the context of eventual consistency and conflict resolution in distributed databases, file systems, and data replication scenarios. ...

November 12, 2023 · 8 min · KKKZOZ

Paper Note: Chain Replication

FAQ Is chain replication used in practice over other things like Raft or Paxos? Systems often use both. A common way of building distributed systems is to use a configuration server (called the master in the paper) for maintaining configuration info (e.g., who is primary) and a replication system for replicating data. Paxos/Raft are commonly-used to build the configuration server while the replication system often uses primary-backup or chain replication. ...

November 6, 2023 · 5 min · KKKZOZ

Paper Note: Time, clocks, and the ordering

Happened Before 关系 论文先从事件之间的 Happened Before 关系开始讲起 结合上图我们举例解释一下「Happened Before」关系: 同一进程内部先后发生的两个事件之间,具有「Happened Before」关系。比如,在进程 Q 内部,q_2 表示一个消息接收事件,q_4表示另一个消息的发送事件,q_2 排在 q_4 前面执行,所以 q_2 → q_4。 同一个消息的发送事件和接收事件,具有「Happened Before」关系。比如,p_1 和 q_2分别表示同一个消息的发送事件和接收事件,所以 p_1→ q_2;同理, q_4→ r_3。 「Happened Before」满足传递关系。比如,由 p_1→ q_2, q_2→_q_4和 q_4→ r_3,可以推出 p_1 → r_3。 作者然后说明了并发的概念: Two distinct events a and b are said to be concurrent if a !→ b and b !→ a. 同时作者也描述了与因果性的关系: Another way of viewing the definition is to say that a→b means that it is possible for event a to causally affect event b. Two events are concurrent if neither can causally affect the other. ...

November 4, 2023 · 3 min · KKKZOZ

Paper Note: Chubby

FAQ What is an advisory lock? An “advisory lock” is simply a tool/API provided by Postgres to create arbitrary locks that can be acquired by applications. These locks, however, are not enforced in any meaningful way by the database – it’s up to application code to give them meaning (the same way any other non-database distributed lock would work). What is a write-through cache? A write-through cache is a caching strategy where data is simultaneously written into the cache and the corresponding database or backing store. ...

October 31, 2023 · 6 min · KKKZOZ