Suppose you want to count how many times every word appears across the entire web — billions of pages. A single laptop would grind for years. But the task has a lovely property: counting words on page A has nothing to do with counting words on page B. The work is embarrassingly splittable.
In 2004 Google engineers Jeffrey Dean and Sanjay Ghemawat turned that observation into a pattern called MapReduce. You write two tiny functions — a map that turns each piece of input into key–value pairs, and a reduce that combines all values for the same key — and the system spreads the work across thousands of machines for you.
The genius isn't a clever algorithm. It's a shape: phrase your problem as map-then-reduce, and scaling from one machine to ten thousand becomes someone else's problem.
Comments
Loading comments...