liveBook · Manning

Remote process

As explained in Elixir in Action, Third Edition

A remote registered process is a registered BEAM process located on another node and addressable by a name together with that node's identity.

A remote registered process is a BEAM process running on another node and addressable through a name paired with that node’s identity. Message sending works the same way whether the process is local or remote. section 12.1.3 section 12.4

A PID identifies both the process and its node. In a printed PID, a nonzero first number indicates a remote process; Kernel.node/1 can determine its node programmatically. section 12.1.3

Global registration provides a shared name for directing requests to one synchronization process across a cluster:

  • Registering a name contacts all nodes and updates their local registration caches. section 12.1.3
  • Looking up the name is local and therefore avoids additional network chatter after registration. section 12.1.3
  • Use calls rather than casts between nodes, and prepare for netsplit scenarios when connections fail. section 12.4

Registering and finding a remote process

Register {:todo_list, "bob"} on node1 with :global.register_name/2. Attempting the same registration on node2 returns :no; :global.whereis_name/1 on node2 returns node1’s PID.

How Elixir in Action, Third Edition covers it

How deep it goes
Explains node-aware PIDs, global registration costs, lookup caching, and failure boundaries, but defers detailed netsplit handling.
Examples
Demonstrates competing global registrations, remote name lookup, and GenServer access through a global alias.
What it assumes
Assumes familiarity with BEAM processes, named nodes, and message passing while making remote location behavior explicit.
What you can do after
Operate distributed services by registering, locating, and calling named processes across connected nodes.
How it connects
Connects BEAM nodes, process messaging, global registration, GenServer, and netsplits.

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.