module type Problem =
val identifier :
The identifier for the problem, used to enable multiple map/reduce
problems on a single server.
The type of data sent by server to clients at startup.
The type of client data (that is value computed at startup).
The type of input values passed to client agents.
The type of keys returned by client agents.
The type of values returned by client agents.
The type of overall result.
val init_client :
init -> client_data
Called at client startup with the data registered at server startup.
The returned value will be passed at each
val compare_keys :
key -> key -> int
Ordering over keys. Should follow the contract of .
val map :
(key * value) list
The computation actually done by client agents.
val combine :
value -> value
Used by the server to combine values associated with the same key,
compare_keys being used for key equality.
val reduce :
output -> output
Used by the server to fold all client results at the end of the computation.