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().
The epoch_count indicates how many disconnect messages are generated.
-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().
The epoch indicates how many times the node is restarted.

Link to this section Functions

Debugging.
Debugging.
Link to this function

cast_message(Term, MEssage)

View Source
-spec cast_message(Term :: partisan_remote_ref:p() | partisan_remote_ref:n() | pid(),
             MEssage :: partisan:message()) ->
                ok.
Link to this function

cast_message(Node, ServerRef, Message)

View Source
Cast a message to a remote gen_server.
Link to this function

cast_message(Node, ServerRef, Message, Options)

View Source
Cast a message to a remote gen_server.
Decode state.
Link to this function

forward_message(Term, Message)

View Source
Gensym support for forwarding.
Link to this function

forward_message(Pid, Message, Opts)

View Source
Gensym support for forwarding.
Link to this function

forward_message(Node, ServerRef, Message, Opts)

View Source
Forward message to registered process on the remote side.
Return local node's view of cluster membership.
Link to this function

inject_partition(Origin, TTL)

View Source
Inject a partition.
Attempt to join a remote node.
Leave the cluster.
Remove another node from the cluster.
Return membership list.
Link to this function

members_for_orchestration()

View Source
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.
Link to this function

receive_message(Peer, FullMessage)

View Source
Receive message from a remote manager.
Reserve a slot for the particular tag.
Link to this function

resolve_partition(Reference)

View Source
Resolve a partition.
Link to this function

send_message(Name, Message)

View Source
Send message to a remote peer service manager.
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
Same as start_link([]).
Link to this function

supports_capability(Arg)

View Source
-spec supports_capability(Arg :: atom()) -> boolean().
Attempt to join a remote node.
Update membership.