mix node (paxos_kv v0.2.0)

Starts the node in distributed mode with a numbered node name schema.

Every node has a number started from 0. The name of the nodes gonna be just simply :node0, :node1, etc.

It also tries to connect to other nodes that are already alive. For instance, if you start :node4 with the node task, it will try to connect to :node0, :node1, :node2, :node3 and also some nodes like :node5, :node6, :node7 and so on. That means starting :nodeN will try to connect to the previous N nodes and the next N nodes. Starting :node0 does not trigger any connections. The node task uses long names.

In production you must have a more sophisticated clustering strategy, like libcluster, but for development and testing the node task will help you simplify your daily tasks.

Usage:

Start an IEx shell in distributed mode with the name node4:

  $ iex -S mix node 4

Start node number 3 without the IEx shell:

  $ mix node 3

Summary

Functions

node_name(n)