Name-Based Port Mapper (Nbpm)

Nbpm is a lightweight Elixir module that provides a simplified implementation of the Erlang Port Mapper Daemon (EPMD) protocol. It enables basic functionality for mapping Erlang node names to network ports and handles the registration of nodes. This module is designed as a convenient alternative to a full EPMD implementation, making it easier to facilitate communication between Erlang nodes.

Compatibility

Nbpm is compatible with Mix releases. When you execute "_build/prod/rel/your_app/bin/your_app remote", it automatically generates node names in the format "rem-$(rand)-name" or "rem-$(rand)-sname". Similarly, when you use "_build/prod/rel/your_app/bin/your_app rpc", it generates "rpc-$(rand)-name" or "rpc-$(rand)-sname". Nbpm responds to these names by offering port number 0, indicating that the OS should assign a random port.

Installation

If available in Hex, the package can be installed by adding nbpm to your list of dependencies in mix.exs:

def deps do
  [
    {:nbpm, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/nbpm.