The first one (20,191,202)
article
- Structure at The Short Guide to A and at The Internals of Erlang Distributed Messaging Facility.
Erlang distributed source code reading process start guide:- By starting node
epmd
we found each other. net_kernel
Start tcp connection to establish a stable long process, handshake, setnode, set_cookie.- Inter-node messaging data format used by external term format.
- By starting node
How to opens an ssh tunnel to connect to a remote Erlang VM via Observer.
Observe observer observing want to start node to other nodes, the nodes were observed only ssh network access, other ports blocked,
you can use the port mapping on the epmd ssh tunnel proxy, to achieve node communication.
Furthermore, we can look SSHEX how Erlang comes with ssh to implement the functionality of the library.How to evaluate a string of code in Erlang at runtime.
As a string Erlang language is a great advantage when dynamic run parse / eval input,
which is the basic principle of operation of the Shell Erlang. Most people fantasize about to run inside the browser
Erlang Shell, to achieve control and management background.
For example, this: TryErlang . You can try, but be sure to pay attention to how to limit access. After the hack to prevent direct peopleinit:stop/0
.-
Learn You Some Erlang_ author Fred summarizes the changes added Erlang community for 10 years. Translation attached .
-
Atom is not garbage collection, when the maximum number of atoms (default 1048576), the node will directly crash.
Since the OTP older number can not be directly obtained atom, so indirectly through the context it requireserlang:system_info(info)
to do.
It can be used directly in the new OTP in erlang: system_info (atom_limit) and erlang: system_info (atom_count)
to obtain the maximum value and the current value.
$ erl
Erlang/OTP 20 [erts-9.0] [source] [64-bit] ...
1> [list_to_atom(integer_to_list(I))
|| I <- lists:seq(1, erlang:system_info(atom_limit))].
no more index entries in atom_tab (max=1048576)
Crash dump is being written to: erl_crash.dump...done
Code
Hexadecimal characters turn binary
1> Hexs = ["FF","AC","01"].
2> << <<(list_to_integer(C,16)):8>> || C <- Hexs >>.
<<255,172,1>>