Lectures
- Introduction to distributed storage systems. Safety and Liveness. Linearizability.
Recommended reading: How Amazon web services uses formal methods - Leslie's lectures 1-4.
- Read/write/visualize some TLA+ specs. State machines, actions, invariants, enabling condition of an action, explicit model checkers (like TLC) check invariants by just traversing the state machine.
- Distributed ACID transactions. Isolation: Serializability, optimistic/pessimistic concurrency control, wound-wait deadlock avoidance. Atomicity: Two-phase commits.
- Leslie's lectures 5-6.
- Read TLA+ specs for transaction commit and two-phase commit. Restarts in two-phase commits. Write-ahead logging.
- Chain Replication. Replicated state machines. Write TLA+ specs for a single server key-value store and a chain replicated key-value store.
- Leslie's lectures 8(a,b).
- TLA+ specification is just a temporal formula that accepts certain behaviors. State formulas, invariants, action formulas, box action formulas. Induction for proving invariants. Prove TCSpec from transaction commit has TCTypeOk invariant.
- Stuttering. Prove that two-phase commit implements transaction commit. Eventually. TLA inference and equivalence rules.
- Leslie's lectures 9(a, b).
- Liveness, weak and strong fairness.
- How TLC checks for liveness? Proof lattices for proving liveness.
Recommended reading: (TOPLAS 1982) Proving Liveness Properties of Concurrent Programs