Beethoven.RoleAlloc.Lib (Beethoven v0.2.3)
Library module for RoleAlloc server.
Summary
Functions
Gets the maximum number of retries possible.
Based on total roles to assign * number of nodes
in the cluster via Node.list/0
.
Makes fresh retries tuple. retries have 4 categories 0 -> Role retries 1 -> Total retries 2 -> Max Role retries (# of nodes via Node.list/0) 3 -> Max Total Retries (all roles * all hosts)
Takes input role map and provides a list of roles needed based on current roles hosted in the cluster.
Generates a new host queue based on how many roles the nodes have. Less roles == higher priority in the queue.
Takes the input role map and outputs a list of roles.
Uses the instance value for each role to create n
amount of roles in the list as needed,
Functions
Gets the maximum number of retries possible.
Based on total roles to assign * number of nodes
in the cluster via Node.list/0
.
If result equals <4 output value will be 4.
Makes fresh retries tuple. retries have 4 categories 0 -> Role retries 1 -> Total retries 2 -> Max Role retries (# of nodes via Node.list/0) 3 -> Max Total Retries (all roles * all hosts)
Takes input role map and provides a list of roles needed based on current roles hosted in the cluster.
@spec make_host_queue() :: :queue.queue(node())
Generates a new host queue based on how many roles the nodes have. Less roles == higher priority in the queue.
Takes the input role map and outputs a list of roles.
Uses the instance value for each role to create n
amount of roles in the list as needed,