Module P2p_poldercast_lwt.Make
Functor building an implementation of Poldercast with Lwt given a FIXME Node_id, Node, gossip View, PolderCast Gossip protocol, and an Io event handler module.
Parameters
Node_id : P2p.S.NODE_IDGroup_id : P2p.S.GROUP_IDNode : P2p.S.NODE with type nid := Node_id.tGroup : P2p.S.GROUP with type gid := Group_id.tView : P2p.S.VIEW with type nid := Node_id.t and type node := Node.tMsg_id : P2p.S.MSG_IDRingcast : P2p.S.GOSSIP_DISSEM with type nid := Node_id.t and type node := Node.t and type view := View.t and type mid := Msg_id.tRingcast_io : P2p_ringcast_lwt.S.RINGCAST_IO with type nid := Node_id.t and type node := Node.t and type view := View.t and type mid := Msg_id.tRingcast_lwt : P2p_ringcast_lwt.S.RINGCAST with type nid := Node_id.t and type node := Node.t and type view := View.t and type mid := Msg_id.t and type io := Ringcast_io.tPoldercast : P2p_poldercast.S.PUBSUB with type nid := Node_id.t and type gid := Group_id.t and type node := Node.t and type group := Group.t and type view := View.t and type mid := Msg_id.t
Signature
val init : me:node -> max_subs:int -> view_len:int -> xchg_len:int -> period:float -> fanout:int -> seen_len:int -> sub_list:(group * view) list -> stop:unit Lwt.t option -> io:(group -> ring_io) -> tinit node view view_len xchg_len period fanout seen_capinitializes a PolderCast instance with the following configuration.- parameter me
this node
- parameter view
initial view
- parameter view_len
max view length
- parameter xchg_len
number of entries to exchange at each period
- parameter period
gossip period, in seconds
- parameter fanout
dissemination fanout
- parameter seen_len
length of queue of last seen message IDs
- parameter stop
thread that shuts down all groups when cancelled
val run : t -> unit Lwt.trun treturns a promise that is fulfilled uponshutdown
val shutdown : t -> unitshutdown tshuts down all subscribed groups.After calling this function,
subcannot be called again witht.