This module contains services which are similar to remote procedure calls. It also contains broadcast facilities and parallel evaluators. A remote procedure call is a method to call a function on a remote node and collect the answer. It is used for collecting information on a remote node, or for running a function with some specific side effects on the remote node.
As returned by
Evaluates
Evaluates
If the reply arrives after the call times out, no message
will contaminate the caller's message queue, since this
function spawns off a middleman process to act as (a void)
destination for such an orphan reply. This feature also makes
this function more expensive than
Like
Like
Implements call streams with promises, a type of RPC which does not suspend the caller until the result is finished. Instead, a key is returned which can be used at a later stage to collect the value. The key can be viewed as a promise to deliver the answer.
In this case, the key
Returns the promised answer from a previous
Equivalent to
This is a non-blocking version of
Equivalent to
Equivalent to
Equivalent to
In contrast to an RPC, a multicall is an RPC which is sent concurrently from one client to multiple servers. This is useful for collecting some information from a set of nodes, or for calling a function on a set of nodes to achieve some side effects. It is semantically the same as iteratively making a series of RPCs on all the nodes, but the multicall is faster as all the requests are sent at the same time and are collected one by one as they come back.
The function evaluates
The following example is useful when new object code is to be loaded on all nodes in the network, and also indicates some side effects RPCs may produce:
%% Find object code for module Mod
{Mod, Bin, File} = code:get_object_code(Mod),
%% and load it on all nodes including this one
{ResL, _} = rpc:multicall(code, load_binary, [Mod, File, Bin]),
%% and then maybe check the ResL list.
Evaluates
Equivalent to
Evaluates
Equivalent to
Broadcasts the message
Equivalent to
Broadcasts the message
Returns
The function is synchronous in the sense that it is known that all servers have received the message when the call returns. It is not possible to know that the servers have actually processed the message.
Any further messages sent to the servers, after this function has returned, will be received by all servers after this message.
This function can be used when interacting with a server
called
The function returns the answer
Equivalent to
This function can be used when interacting with servers
called
This function is deprecated. Use
In Erlang/OTP R6B and earlier releases,
For every tuple in
Evaluates
Location transparent version of the BIF
Location transparent version of the BIF