· papers  · 2 min read

MapReduce: Simplified Data Processing on Large Clusters

Author(s): Jeffrey Dean and Sanjay Ghemawat

Date: 2004

Notes

  • MapReduce
    • “Users specify a map function that processes a key/value pair to generate a set of intermediate key/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key.”
    • Used for processing large data sets
    • Programs can be parallelized and executed on large clusters of machines, making it highly scalable
  • Drawbacks
    • The distributed nature can have significant drawbacks if there is a lot of network latency between the machines
  • Examples
    • Distributed Grep - The map function creates a line if it matches the pattern, the reduce function copies the intermediate data to the output
    • Count of URL Access Frequency - The map function processes logs of web page requests and outputs, the reduce function adds together all va lues for the same URL with a total count per URL pair
  • In Practice
    • A user writes both the map and the reduce function for their dataset
    • The master computer divides the dataset into M map functions and R reduce functions and sends the details to the corresponding number of workers
    • Map workers perform the map function and then store the output on their local disks
    • Reduce workers reach out to the correct map workers (orchestrated by the master program) to get the data they need to perform the reduce function
    • Reduce workers output the result to R number of output files, which are then sent back to the user program by the master computer once the work is completed

Resources

💬 The Overcommitted community

Join the Overcommitted Discord
Back to Blog

Related Posts

View All Posts »

Working with clay

AI builds everything as this huge monster of too much, and now I feel like I’m iterating by trimming things back and perfecting it over time. It’s a bit like working from clay, and allowing the software underneath to expose itself in the…

Atproto Is the Context Window You Own

I don't think it's a coincidence that atproto is taking off at the same time AI is. Well, okay, it kind of is a coincidence. I don't think anybody planned these things to work out at the same time. But it's a lucky alignment that I think…