What a Distributed System Is, and Why It's Hard
You already operate distributed systems — you just may not have called them that. The moment your application talks to a database on another machine, a Redis cache, a background-j…
Foundations of Distributed Systems covers: What a Distributed System Is, and Why It's Hard, Failure Models, Time, Clocks, and the Ordering of Events, Impossibility Results, Distributed Snapshots and Consistency in Practice. Year 3, Quarter 9. Includes 10 exercises and 3 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Complete prerequisites first to enroll.
You already operate distributed systems — you just may not have called them that. The moment your application talks to a database on another machine, a Redis cache, a background-j…
To build a system that tolerates failure, you first have to say precisely what kinds of failure you're tolerating — because "the machine broke" hides wildly different scenarios, a…
Here's a question that sounds trivial and isn't: in a distributed system, did event A happen before event B? On one machine, easy — check the clock, or the order they executed. Ac…
The theory-of-computation course taught you that some problems are provably impossible to solve at all. Distributed systems has its own impossibility results, and they're just as …
This lesson closes the foundations course by turning theory into practice. First, a beautiful algorithm: how do you capture a consistent snapshot of an entire distributed system —…
- [ ] Implement Lamport logical clocks in Ruby — Increment on send, max+1 on receive - [ ] Implement vector clocks in Ruby — Array of counters, merge on receive - [ ] Diagram the …
- [ ] MIT 6.5840 Lab 1: MapReduce — Build a MapReduce framework: coordinator distributes map and reduce tasks to workers, handles worker failures - [ ] MIT 6.5840 Lab 2: Key/Value…
- [ ] Prove the FLP impossibility result (written) — One faulty process prevents deterministic consensus - [ ] Implement a gossip protocol in Ruby — Epidemic-style dissemination, …
- [ ] Build a distributed key-value store in Ruby — 3 server processes communicating via TCP, quorum reads/writes (W=2, R=2 of N=3), handle network partitions, demonstrate consist…
Build a Ruby program simulating 3-5 distributed processes exchanging messages. Implement both Lamport timestamps and vector clocks. Output a space-time diagram (ASCII art) showing…
Implement epidemic-style gossip dissemination in Ruby. N nodes, each holding a value. One node gets an update, gossips to random peers each round. Measure how many rounds until al…
- [ ] Milestone 1: Node GenServer with state (term, log, commit index) - [ ] Milestone 2: Leader election with randomized timeouts - [ ] Milestone 3: Log replication — AppendEntri…
- [ ] What is the CAP theorem? Give an example of a CP system and an AP system. - [ ] What are Lamport clocks and vector clocks? What problem do they solve? - [ ] Explain the happ…
13 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.