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