I Built MapReduce from Scratch
dev.to·14h·
Discuss: DEV
🌍Edge Computing
Preview
Report Post

Why I did this to myself and why distributed systems are hard

So here’s the thing. You can read the Google MapReduce paper in an afternoon. It’s 13 pages. I’ve read it maybe four times now. And every time I thought I understood it. Then I tried to actually build the thing.

The scenario that got me started: you have a 1TB log file. You need word counts. What do you do?

Option 1: You load it all into memory and your laptop catches fire. Option 2: Process line by line on one machine, but you graduate before it finishes. Option 3: Split the work across machines and combine their results at the end.

I went with option 3. Google figured this out in 2004. Twenty years later, I’m in my room at 2 a.m. wondering why worker 2 keeps dying.

The formal problem is this: given inpu…

Similar Posts

Loading similar posts...