Skip to main content
NewEpisode 3a is out: Carry the conversation onWatch →
Overview · 1

Why Distributed Is Hard: Counting Eight Books

The lab's own mrsequential.go and wc.go count eight books: 3.3 MB, 623,948 words, 22,107 different ones, in a fraction of a second on one laptop. Scaled to 1 TB that is over ten hours (worked out), and the pairs would not fit in memory, so the work has to spread over machines. Splitting it brings four problems: a crashed worker that nobody notices (dead and slow look the same; crash.go kills a third of its calls on purpose); two workers writing one file; labrpc dropping requests and replies, both of which make Call return false, so you cannot tell whether the server did the work; and a coordinator that needs copies that agree. Then the five labs on that picture, and a tour of src/: what is given to you and the ten files you write. Your turn: run it yourself and guess how often "Sherlock" appears.

Up next2 · The MapReduce Model: Map, Partition, Reduce→