This library must be used in conjunction with Horde. Horde by itself works in a well defined environment where all instances are known at startup. HordeConnector allows new BEAM nodes to be added to the Horde dynamically at runtime. Your application will still be responsible for linking nodes (we suggest using libcluster). Once linked, HordeConnector will automatically join nodes to Horde upon connection.
This package can be installed by adding horde_connector
to your list of dependencies in mix.exs
:
def deps() do
[
{:horde_connector, "~> 0.1.1"}
]
end
Configure Horde per their documentation HERE.
Start HordeConnector
under you application.
# application.ex
def start(_type, _args) do
children = [
# ....
{Horde.Registry, [name: MyApp.Registry]},
{Horde.Supervisor, [name: MyApp.Horde.Supervisor, strategy: :one_for_one]},
{HordeConnector, [supervisor: MyApp.Horde.Supervisor, registry: MyApp.Registry]}
]
# ....
Supervisor.start_link(children, opts)
end
And that's it! Once HordeConnector is started, any time Node.connect/1
is called the new node will be added to the Horde cluster.
Released under Apache 2 license.