3 ms·
> One critical difference is that in Erlang, processes can run on remote machines, seamlessly. Is there a concise way to explain how Erlang achieves this prope
by thakoppno 3y ago
> One critical difference is that in Erlang, processes can run on remote machines, seamlessly.
Is there a concise way to explain how Erlang achieves this property?
- deleted 3y ago[deleted]
- querulous 3y agoit's not as mysterious as it sounds. every data structure (including modules and anonymous functions) has a binary serialization and every erlang vm is also an rpc server that can receive arbitrary data -- including whole programs -- and execute them. your vm of course needs to know about the remote vms to do so but that's where the rudimentary clustering mechanism in erlang comes into play
- thomasfortes 3y agoAlso no shared memory in processes and they all communicate strictly through message passing, so running a piece of code in the local node, in another node in the same machine or in a node on the other side of the planet is a matter of telling which pid you want to send the message to, the BEAM will figure out how to send the message to the correct place in the cluster and your program will be none the wiser.
- rramadass 3y agoYou can find all the details about Erlang internals in The BEAM book : https://blog.stenmans.org/theBeamBook/ https://blog.stenmans.org/theBeamBook/
- coldtea 3y agoIt's basically a distributed RPC system. Your call is a message.