Horde
Horde packages a distributed Supervisor and Registry built on δ-CRDTs.
Installation
If available in Hex, the package can be installed
by adding horde to your list of dependencies in mix.exs:
def deps do
[
{:horde, "~> 0.1.0"}
]
endUsage
Public APIs of Supervisor and Registry have been reproduced as faithfully as possible. Horde.Supervisor and Horde.Registry should function more or less as drop-in replacements.
{:ok, supervisor} = Horde.Supervisor.start_link([], node_id: :distributed_supervisor_1, strategy: :one_for_one)
Horde.Supervisor.start_child(supervisor, child_spec)Horde runs inside Erlang clustering (but might later be ported to use other transport methods). Joining up supervisors or registries must be done manually:
Horde.Tracker.join_hordes(supervisor_1, supervisor_2)Leaving a horde is also possible:
Horde.Tracker.leave_hordes(supervisor_2)See the docs at https://hexdocs.pm/horde.