The Erlang system seems to me to have 3 features: 1. Distribution 2. Multi-core support 3.FP. These 3 features are distributed I think Erlang is the most powerful, supported from the first version to the present, relatively very mature, and multi-core support has been added in these years.
Erlang's distribution system achieves 2 points:
1. Location independence of the nodes;
2. Distributed and transparent to users.
The concrete embodiment is node is by name recognition, process is also rely on PID to identify.
Distribution system to achieve communication between nodes, Erlang is not listed outside. Erlang's node communication media is replaceable and the current official version supports TCP, SSL communications.
You can use-proto_dist xxxx to select a channel. Currently support Inet_ssl INET_TCP users can easily imitate the 2 communication protocols, write their own transmission channel, is to require that the channel is reliable, can not lose information.
These implementations are firewall friendly:
{inet_dist_use_interface, ip_address()}
//If the host of an Erlang node has several network interfaces,
//this parameter specifies which one to listen on.
See inet(3) for the type definition of ip_address().
{inet_dist_listen_min, First}
See below.
{inet_dist_listen_max, Last}
Define the First..Last port range for the listener socket of a distributed Erlang node.
The ERL modules associated with distribution in Erlang's kernel are mainly Net_kernel inet_tcp_dist inet_ssl_dist inet_tcp dist_util Erlang (trap send/link, etc.).
The kernel module starts the Net_kernel and EPMD modules when the user runs Erl-sname xxxxx to start the Erlang system.
The role of EPMD is to provide a node name to the mapping of the listener address port. EPMD on the well-known port 4369.
Net_kernel will start proto_dist such as inet_tcp_dist listening port, while the port is reported to EPMD.
This is when ERTs is ready for node communication.
At this time another node to communicate with us, the first to connect, the process is probably like this:
1. Locate the node address according to the section name.
2. Query node 4369 port, that is EPMD, to it to the node corresponding to the Inet_tcp_dist listening port.
3. Initiate a connection, handshake, cookie authentication, if not authorized to fail.
4. Record the node name and response information.