Between nodes, message are (must be) passed over TCP/IP. However, by what mechanism are they passed between processes running on the same node? Is TCP/IP used in this case as well? Unix domain sockets? What is the difference in performance between "within node" and "between node" message passing?
+3
A:
"All data in messages between Erlang processes is copied, with the exception of refc binaries on the same Erlang node.":
http://erlang.org/doc/efficiency_guide/processes.html#id2265332
hdima
2010-08-02 21:51:41
If TCP/IP were used as the transport the message would certainly be "copied", but they could also be copied used if some other mechanism were used, so I think that this resolves the question.
mjs
2010-08-02 22:04:20
All data in messages between Erlang processes on the same Erlang node is copied in the memory. Moreover refc binaries are shared between Erlang processes on the same Erlang node. So it's much much faster than TCP/IP.
hdima
2010-08-02 22:30:02
Hmm... Did you mean Erlang processes and Erlang node in the original question?
hdima
2010-08-02 22:34:20