Example using swarm to distribute processes across nodes with failover monitoring.
When swarm registers a process on a node, and that process exits abnormally, and/or is restarted by its local supervisor, Swarm will not account for this process during topology changes. This uses a GenServer process to register and monitor Swarm registered processes, and when abnormal exits occur, re-registers the processes through Swarm again.
iex --name [email protected] -S mix
iex --name [email protected] -S mix
iex --name [email protected] -S mix