API Reference Beethoven v0.3.9

Modules

A Decentralized failover and peer-to-peer node finding framework for Elixir. Using a TCP socket, Elixir nodes running Beethoven can find each other within a pre-defined network range.

Allocator is a stack of processes that facilitate the aggregation of telemetry signals to determine how busy a given Beethoven node is.

Behaviour to define signals via the signal() macro.

Crunches signal data and generates an allocation (or busy-score) score for the current node. Signal data is pulled from the Beethoven.Allocator.Ingress.Cache ets table. The aggregated score is stored in the Beethoven.Allocator.Tracker Mnesia table. This PID will refresh the score anytime Beethoven.Allocator.Ingress pushes an update and sends a cast to this PID.

GenServer to handle ingress of signal data. Data sent to this Server is pushed into :ets for use by Beethoven.Allocator.Cruncher.

WORK IN PROGRESS!

Azure Platform awareness for the node. If the app is not in Azure, genserver will response :no_azure to all calls.

Beacon Server is used to help other Beethoven node find the cluster. This is the TCP Listener the Beethoven.Locator server will check for.

Core Service for Beethoven. Watches other nodes within the cluster and cascade updates across the beethoven PIDs as needed.

Distr(ibuted)Server is a modified GenServer that allows for seamless integration with a dedicated Mnesia table. This was specially built for operation in a Beethoven environment. The idea is that the brain of the genserver can be set with mnesia and not the GenServer's internal state. This allows for the compute and state of the genserver to be distributed across the Beethoven cluster.

Stack of services to help check system utilization and push sampled data into the Beethoven.Allocator stack of services.

Tracks historical CPU and RAM usage as sampled by HwMon.Server. Each metric will only cache up to 100k entries. Entries are pruned via FIFO.

DistrServer to monitor hardware resources and sends signals to Beethoven.Allocator plus the integrated Mnesia table.

Module to handle scanning IPV4 addresses within a network.

GenServer to handle searching for other Beethoven nodes or clusters. This Locator server's goal is to find a BeaconServer on another node. Once connected, they will communicate with each other via the Beethoven.SeekChat module.

Generic Library to simplify certain Mnesia tasks.

Simple PID to track when Beethoven has fully initialized. Usually just called from RoleServer when it has ran out of work.

The RoleMgmt stack is a collective of servers responsible for the management and allocation of specialized OTP complaint PIDs. These specialized PIDs are referred to as roles. Roles are defined in in the application config for :beethoven. To understand compatibility for using a module as a Beethoven role, please see the below section on Role Compatibility.

Server to track nodes and their role assignments. Once boot, the service will assign one of each open roles to itself. These roles are cast to the Manager service to spawn the roles.

Failover monitor for roles. Listens for updates from Beethoven.CoreServer and will reassign work on the RoleMgmt.Assign.Tracker. Will reassign using Beethoven.Allocator. The update to mnesia will be monitored by Assign who will handle the assignment to self.

Dynamic supervisor that manages the specialized role PIDs.

DEPRECATED! Do not use. Use Beethoven.RoleMgmt instead.

This server is responsible for the management and allocation of specialized OTP complaint PIDs. Roles are defined in in the application config for :beethoven.

Module to simplify the interface between nodes during the locator Seeking flow.

Beethoven Allocator signals for the Beethoven service itself.

Supervisor for core services. These are the services that need to start once Locator has determined the cluster state.

Test role to test RoleServer operations.

Example role that leverages DistrServer instead of GenServer.

Module for generic utilities.