Beethoven.RoleAlloc (Beethoven v0.2.3)

Role Allocation Server. Works as a queue to assign roles needed by the configuration.

TODO

  • Fix bug where a node goes down, but comes back up before it is updated in tracker ex: Node (nodeY@127.0.0.1) is back online Potential solutions
    • a task that waits and calls the role alloc server back to let it know if it needs to remove the node or not?

Summary

Functions

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init.

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init. (random number between 2.5-5.75 seconds)

Returns a specification to start this module under a supervisor.

Entry point for Supervisors. Links calling PID this this child pid.

Functions

async_start()

@spec async_start() :: :ok

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init.

async_timed_start()

@spec async_timed_start() :: :ok

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init. (random number between 2.5-5.75 seconds)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(list)

@spec start_link(any()) :: {:ok, pid()}

Entry point for Supervisors. Links calling PID this this child pid.