I forgot to say that the file is not present on 2nd node...so, maybe I could not use code:load_binary.....<br><br><div class="gmail_quote">On Tue, May 26, 2009 at 1:59 PM, Alin Popa <span dir="ltr"><<a href="mailto:alin.popa@gmail.com">alin.popa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>It is possible to send remote a module source and that one to be compiled there ? <br>
Or, I have a compiled module but is not loaded on the remote process; is it possible to send it there, or I should express load it on the remote process?<br>
This is my test module:<br><br><b>-module(test).<br>-export([test_fun/0]).<br><br>test_fun() -><br> io:format("Hello ~p~n",["World"]).</b><br><br><br>now, start one erlang process(on 1st machine):<br>
<br><b>erl -name <a href="mailto:node@10.0.0.1" target="_blank">node@10.0.0.1</a> -setcookie test123</b><br><br>... start other erlang process (on 2nd machine):<br><b>erl -name <a href="mailto:node@10.0.0.2" target="_blank">node@10.0.0.2</a> -setcookie test123</b><br>
<br>In 1st node:<br><br><b>1> c(test).<br>{ok, test}<br>2> <br clear="all"></b><br>In 2nd node, do nothing...<br><br>In the 1st node:<br><br><b>2> spawn('<a href="mailto:node@10.0.0.2" target="_blank">node@10.0.0.2</a>', test, test_fun, []).</b><br>
<br><b>Error in process <0.49.0> on node '<a href="mailto:node@10.0.0.2" target="_blank">node@10.0.0.2</a>' with exit value: {undef,[{test,test_fun,[]}]}</b><br><br>(Which is normal, I think)<br><br><br>So, somewhere in this <i>flow, </i>something like <i>remote module loading</i> can be done ?<br>
<br>Thanks.<br><br>-- <br>Regards,<br><font color="#888888"><br>Alin<br><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br><br>Alin<br><br>