Nopmd - standard erlang proto_dists stripped of epmd, easy/straightforward use

# mix.exs
{:nopmd, "> 0.0.0"}

# nodename example (--sname not supported, obviously)
--name mynode@127.0.0.1:8080

# ipv6 nodename example
--name mynode@::1:8080

# erl flags (go in --erl "...")
-pa _build/(dev|prod)/lib/nopmd/ebin \
-proto_dist nopmd_(inet|inet6)_(tcp|tls)_dist \
-start_epmd false

Elixir Releases

Uncomment RELEASE_DISTRIBUTION and RELEASE_NODE in env.sh.eex, then add the following and modify as needed:

export RELEASE_PORT=${RELEASE_PORT:-"8080"}
export RELEASE_AUX_PORT=${RELEASE_AUX_PORT:-"8000"}
export RELEASE_PROTO_DIST=nopmd_inet_tcp
export ELIXIR_ERL_OPTIONS="-pa lib/nopmd-0.1.0/ebin -proto_dist $RELEASE_PROTO_DIST -start_epmd false"

case $RELEASE_COMMAND in
  start*|daemon*)
    export RELEASE_NODE=$RELEASE_NODE:$RELEASE_PORT
    ;;
  *)
  export ELIXIR_ERL_OPTIONS="$ELIXIR_ERL_OPTIONS -name $RELEASE_NODE:$RELEASE_AUX_PORT -kernel logger_level error"
  export RELEASE_NODE=$RELEASE_NODE:$RELEASE_PORT
    ;;
esac
4 Likes

How od that different from epmdless? From what I see it replaces dist modules, but I do not fully understand why it does so instead of replacing EPMD module.

In nopmd there’s no need for a discovery service like epmd, the port number is a part of the nodename so the nodes are always aware of what port whichever node is running on, no need for using special functions like epmdless_client:add_node to create a complete mesh, etc.

2 Likes