Mirror of Erlang's :rpc module under Lockstep's controlled
scheduling. Cross-node apply/4-style calls are modeled by
spawning a process on the target node, having it execute the
function, and shipping the result back to the caller via a
Lockstep-controlled message.
Partition-aware: if the caller's node and the target are in
opposing partition groups, the spawn message itself is dropped or
deferred (per partition mode). Calls in :drop partitions error
with {:badrpc, :nodedown}-equivalent semantics; in :defer
partitions they hang until heal (and then complete).
Supported
call/4,5-- synchronous remote callmulticall/4,5-- call same function on a list of nodes, gather successes and failurescast/4-- fire-and-forget remote callabcast/2,3-- async broadcast a message to a registered atom name on every node
Summary
Functions
Single-arity abcast: broadcasts to all known nodes.
Async-broadcast msg to a registered atom name on every node
in nodes. Mirrors :rpc.abcast/3.
Synchronous call: invoke apply(module, fun, args) on node,
return its result.
Fire-and-forget call: apply(module, fun, args) on node with no
reply. Returns true (matching :rpc.cast/4's contract).
Call apply(module, fun, args) on each node in nodes. Returns
{successes, bad_nodes} where successes is the list of return
values (in node order) and bad_nodes is a list of nodes that
errored or timed out.
Functions
Single-arity abcast: broadcasts to all known nodes.
Async-broadcast msg to a registered atom name on every node
in nodes. Mirrors :rpc.abcast/3.
Synchronous call: invoke apply(module, fun, args) on node,
return its result.
Returns the function's value, or {:badrpc, reason} on failure
(timeout, unreachable node, etc.) -- mirroring :rpc.call/4-5.
Fire-and-forget call: apply(module, fun, args) on node with no
reply. Returns true (matching :rpc.cast/4's contract).
Call apply(module, fun, args) on each node in nodes. Returns
{successes, bad_nodes} where successes is the list of return
values (in node order) and bad_nodes is a list of nodes that
errored or timed out.