Beethoven (Beethoven v0.3.0)

A Decentralized failover and peer-to-peer node finder for Elixir. Allows Elixir nodes to find each other automatically. Once connected, they can coordinate to delegate roles and tasks between the nodes in the cluster. Written using only the Elixir and Erlang standard library.

This module acts as the unified client for interacting with beethoven as an external client. Avoid using the other modules for external PID calls to beethoven services.

Summary

Types

List of node names.

Status of a Beethoven cluster node.

List of nodeStatus() objects.

Role data structure.

List of role().

Functions

Returns all active cluster nodes by their Node name URI. Returns an empty list if this node is in :standalone.

Returns all cluster nodes and their state.

Returns state of this node within the Beethoven cluster. Return will only be :clustered or :standalone.

Returns all roles hosted in Beethoven.

Types

nodeList()

@type nodeList() :: [node()]

List of node names.

nodeStatusMap()

@type nodeStatusMap() :: %{
  node: node(),
  status: Beethoven.CoreServer.nodeStatus(),
  last_change: DateTime.t()
}

Status of a Beethoven cluster node.

nodeStatusMapList()

@type nodeStatusMapList() :: [nodeStatusMap()]

List of nodeStatus() objects.

role()

@type role() :: %{
  role: atom(),
  count: integer(),
  assigned: integer(),
  nodes: nodeList()
}

Role data structure.

roleList()

@type roleList() :: [role()]

List of role().

Functions

get_active_nodes()

@spec get_active_nodes() :: nodeList()

Returns all active cluster nodes by their Node name URI. Returns an empty list if this node is in :standalone.

get_cluster_nodes()

@spec get_cluster_nodes() :: nodeStatusMapList()

Returns all cluster nodes and their state.

get_node_status()

@spec get_node_status() :: Beethoven.CoreServer.serverStatus()

Returns state of this node within the Beethoven cluster. Return will only be :clustered or :standalone.

get_roles()

@spec get_roles() :: roleList()

Returns all roles hosted in Beethoven.