map function which is going to create a list of key-value pairs and the
reduce function, which will iterate over each value and then apply a process (merge or summarization) to get an output.
In MapReduce, the data could be split into several nodes (sharding) in that case we will need a
partition function. The
partition function will be in charge of sort and load balancing. In MongoDB we can work over sharded collections automatically...