3 ms·
Excuse a noob question, but what gets transmitted over the wire as `F` in the `become` message? Source, bytecode, function name, etc? ie. does the universal ser
by kitd 3y ago
Excuse a noob question, but what gets transmitted over the wire as `F` in the `become` message? Source, bytecode, function name, etc? ie. does the universal server need F in its "classpath" (or whatever the Erlang equivalent is)? If not, are there platform &| security issues when calling the universal server distributed?
Genuine question. It's a fantastic attribute of Erlang to be able to do this.
- eru 3y agoThere are no extra security issues, because at this point you already assume that the other side is trustworthy. I think you can assume that they are sending something like bytecode, but might optimize that, if both are eg on the same physical machine.
- dottedmag 3y agoIt will be a closure "fun () -> ...", and it's serialized bytecode + a copy of captured variables — remember, they all are immutable. For a intra-node call it will be a reference to the bytecode, no need to copy anything. However if this code refers to any functions from modules via syntax "foo:bar/1" then these references will be resolved on the target node, and both nodes better have the same versions of modules loaded.