Distributed systems often need a remote function’s result rather than a fire-and-forget process. :rpc.call/4 performs that request across Erlang nodes. section 12.1.5
Pass the target node and an MFA—module, function, and argument list—to invoke the function remotely. For example, calling Kernel.abs(-1) on node2 returns 1. section 12.1.5
Underneath, :rpc sends the MFA to the target node’s registered :rex process, which applies the function and sends the response back. Helpers also support calls across multiple nodes. section 12.1.5
iex(node1@localhost)1> :rpc.call(:node2@localhost, Kernel, :abs, [-1]) 1
A minimal IEx listing shows the node, module, function, arguments, and returned value in one remote call. section 12.1.5
