Using libcluster in order to create a Elixir cluster and GenServer for node connection monitoring.
Run mix deps.get
and then iex -name [email protected] --cookie secret_token -S mix
in the first node/terminal and iex -name [email protected] --cookie secret_token -S mix
in the second one.
Now, just run Clustlixir.Ping.ping()
or kill one of those nodes/terminals, and see the magic happen.