View Source partisan_hyparview_peer_service_manager (partisan v5.0.0-beta.14)
This module realises the partisan_peer_service_manager
behaviour implementing a peer-to-peer partial mesh topology using the Hyparview membership protocol.
characteristics
Characteristics
- Uses TCP/IP.
- Nodes are considered "failed" when connection is dropped.
- Nodes maintain partial views of the network. Every node will contain and active view that forms a connected grah, and a passive view of backup links are used to repair graph connectivity under failure. Some links to passive nodes are kept open for fast replacement of failed nodes in the active view. So the view is probabilistic.
- The algorithm constantly works towards and ensures that eventually the membership is a fully-connected component.
- Point-to-point messaging for connected nodes with a minimum of 1 hop via transitive message delivery (as not all nodes directly connected). Delivery is probabilistic.
- Scalability to up-to 2,000 nodes.
Link to this section Summary
Types
The epoch_count indicates how many disconnect messages are generated.
The epoch indicates how many times the node is restarted.
Functions
Debugging.
Debugging.
Cast a message to a remote gen_server.
Cast a message to a remote gen_server.
Decode state.
Gensym support for forwarding.
Gensym support for forwarding.
Forward message to registered process on the remote side.
Return local node's view of cluster membership.
Inject a partition.
Attempt to join a remote node.
Leave the cluster.
Remove another node from the cluster.
Return membership list.
Return membership list.
Return myself.
Register a trigger to fire when a connection drops.
Register a trigger to fire when a connection opens.
Return partitions.
Debugging.
Receive message from a remote manager.
Reserve a slot for the particular tag.
Resolve a partition.
Send message to a remote peer service manager.
Same as start_link([]).
Attempt to join a remote node.
Update membership.
Link to this section Types
-type active() :: sets:set(partisan:node_spec()).
-type epoch() :: non_neg_integer().
-type epoch_count() :: non_neg_integer().
-type message_id() :: {epoch(), epoch_count()}.
-type message_id_store() :: dict:dict(partisan:node_spec(), message_id()).
-type passive() :: sets:set(partisan:node_spec()).
-type reserved() :: dict:dict(atom(), partisan:node_spec()).
-type state_t() :: #state{}.
-type tag() :: atom().
Link to this section Functions
-spec cast_message(Term :: partisan_remote_ref:p() | partisan_remote_ref:n() | pid(), MEssage :: partisan:message()) -> ok.
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
-spec supports_capability(Arg :: atom()) -> boolean().