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_ID
Group_id : P2p.S.GROUP_ID
Node : P2p.S.NODE with type nid := Node_id.t
Group : P2p.S.GROUP with type gid := Group_id.t
View : P2p.S.VIEW with type nid := Node_id.t and type node := Node.t
Msg_id : P2p.S.MSG_ID
Ringcast : 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.t
Ringcast_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.t
Ringcast_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.t
Poldercast : 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) -> t
init node view view_len xchg_len period fanout seen_cap
initializes 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.t
run t
returns a promise that is fulfilled uponshutdown
val shutdown : t -> unit
shutdown t
shuts down all subscribed groups.After calling this function,
sub
cannot be called again witht
.