Map/reduce implementation based on pools.
The algorithm can be sketched out as follows:
- the server generates a list of input values;
- clients register to perform computations from input values to
(key, value) lists through a map function;
- the server dispatches input values to clients using a
a pool structure (cf.
and merges values for the same key using a combine function;
- when all input values have been generated by the server, and all
associated results have been sent by the clients, the server computes
the overall result through a reduce function.
module type Problem =
module type S =
with type input = P.input and type output = P.output and type init = P.init
Functor building a map/reduce implementation for a given problem.