What algorithm or design pattern does Erlang use internally to guarantee a unique pid across multiple nodes? And also what algorithm or design pattern does Erlang use for keeping the global node names mapping synchronized between all the nodes?
The purpose of this question is to create similar behavior in a distributed C#.Net application. The C#.Net system already has high performance, parallel messaging and task scheduling algorithm very similar to Erlang for parallel processing on multiple cores.
The goal now is to extend it to send and receive messages to and from multiple nodes on different machines.
One simple solution will be to make it "client & server" so that only one of the nodes is the "master" for keeping the unique PID and global names of nodes.
But it's a seductive design to have the data replicated between all the nodes so that a network lookup can be avoided every time to check the actual location of a named node, since it might fail over to another machine.
It will be far more efficient for each message passed if any changes to the node name table are replicated to all the nodes like in Erlang.
Plus, what if the "master" node fails? So a distributed, replicated, and synchronized solution is a better design.
Can anyone direct an understanding of how Erlang does this under the covers?