[erlang-questions] code mobility
Thu Oct 21 02:42:10 CEST 2010
I am thinking to what extend Erlang may support (weak) code mobility.
Directly send a function to another node will not work because only
function signatures are sent. I tried sending functions in 3 ways:
1) send a string to a remote node, where a erlang interpreter is
2) get the representation of function by calling erlang:fun_info/1,
send the representation, then reconstruct the function at remote node.
3) force the remote node loading the module where the function is
contained, so that function could be called by its name.
Notice that none of the above solutions are satisfactory if another
helper function is needed. If this is the case, then I have to send
all potentially involving functions by hand.
Could anyone offer a better solution to send a function in Erlang.
Or, perhaps, some efforts have been done before? I think code
mobility will became more and more important for future languages.
More information about the erlang-questions