sig
module type Marshalable =
sig
type t
val receive :
Async.Std.Reader.t ->
[ `Eof | `Ok of Protocol.Marshalable.t ] Async.Std.Deferred.t
val send : Async.Std.Writer.t -> Protocol.Marshalable.t -> unit
end
module WorkerRequest :
functor (Job : MapReduce.Job) ->
sig
type t =
MapRequest of Job.input
| ReduceRequest of Job.key * Job.inter list
val receive :
Async.Std.Reader.t -> [ `Eof | `Ok of t ] Async.Std.Deferred.t
val send : Async.Std.Writer.t -> t -> unit
end
module WorkerResponse :
functor (Job : MapReduce.Job) ->
sig
type t =
JobFailed of string
| MapResult of (Job.key * Job.inter) list
| ReduceResult of Job.output
val receive :
Async.Std.Reader.t -> [ `Eof | `Ok of t ] Async.Std.Deferred.t
val send : Async.Std.Writer.t -> t -> unit
end
end