A distributed Erlang system consists of a number of Erlang runtime systems communicating with each other. Each such runtime system
is called a node. Message passing between processes at different nodes, as well as links and monitors, are transparent when pids are used.
Registered names, however, are local to each node. This means the node must be specified as well when sending messages etc. using registered
names.
Nodes
A node is an executing Erlang runtime system which has been given a name, using the command line flag -name (long names) or -sname (short names).
The format of the node name is an atom name@host where name is the name given by the user and host is the full host name if long names
are used, or the first part of the host name if short names are used. node() returns the name of the node.
Note: A node with a long node name cannot communicate with a node with a short node name.
The nodes in a distributed Erlang system are loosely connected. The first time the name of another node is used, for example if spawn(Node,M,F,A)
or net_adm:ping(Node) is called, a connection attempt to that node will be made.
Connections are by default transitive. If a node A connects to node B, and node B has a connection to node C, then node A will also try to connect
to node C. This feature can be turned off by using the command line flag -connect_all false, see erl(1).
If a node goes down, all connections to that node are removed. Calling erlang:disconnect(Node) will force disconnection of a node.
The list of (visible) nodes currently connected to is returned by nodes().
is called a node. Message passing between processes at different nodes, as well as links and monitors, are transparent when pids are used.
Registered names, however, are local to each node. This means the node must be specified as well when sending messages etc. using registered
names.
Nodes
A node is an executing Erlang runtime system which has been given a name, using the command line flag -name (long names) or -sname (short names).
The format of the node name is an atom name@host where name is the name given by the user and host is the full host name if long names
are used, or the first part of the host name if short names are used. node() returns the name of the node.
Note: A node with a long node name cannot communicate with a node with a short node name.
The nodes in a distributed Erlang system are loosely connected. The first time the name of another node is used, for example if spawn(Node,M,F,A)
or net_adm:ping(Node) is called, a connection attempt to that node will be made.
Connections are by default transitive. If a node A connects to node B, and node B has a connection to node C, then node A will also try to connect
to node C. This feature can be turned off by using the command line flag -connect_all false, see erl(1).
If a node goes down, all connections to that node are removed. Calling erlang:disconnect(Node) will force disconnection of a node.
The list of (visible) nodes currently connected to is returned by nodes().