moving processes from node to node

Roussel Jérôme roussel@REDACTED
Mon Jun 23 10:35:17 CEST 2003


Bengt Kleberg wrote:
>>X-Injected-Via-Gmane: http://gmane.org/
>>To: erlang-questions@REDACTED
>>From: Roussel Jérôme <roussel@REDACTED>
>>Subject: moving processes from node to node
> 
> 
> 
>>	- is it possible to transfer a whole application (with all its modules) 
>>from one computer (using one erlang node) to another computer (with 
>>another erlang node)? I don't talk about process migration because I 
>>only want to copy all the files of an application from the hard drive of 
>>computer A to put all theses files onto the hard drive of computer B
>>
>>	- is it possible next to check if all the needed modules are available 
>>on the computer B?
>>
>>	- if all this is possible, is it possible, in one word, to move one 
>>application from one node to another (without doing it by hand) ???
> 
> 
> ''by hand''? does this mean ''sneaker net'' (manually carrying the
> files on some media), or would ''scp <files> <computer>'' also be ''by
> hand''?
> 

By hand, this mean using scp (or rsync, or ...) and ''sneaker net''.
I am looking for a way to do all this with only one command in erlang 
and every thing would be copied. For example, I would have a registry or 
a database of every application on a node. Another node connects to the 
first node, it sees the applications in tha database and says : I don't 
have this application and this one, so I download them. Now, if you (the 
user) want, these applications are on the computer and you can use it.

> 
> while waiting for the high tech solution (presumably there is already
> some otp module that does this) i have the following (bfmi) suggestion:
>
Do you think there is an otp module for this ??? It would be wonderful.


> 1 use the code module to find the modules (code:which/1)
> 2 use the file module to read them (file:read_file/1)
> 3 (possibly use rpc:call/4 with file:make_dir/1 to create correct
> directory on the other node)
> 4 using the binaries from step 2, write them on the other node
> (rpc:call/4 with file:write_file/2)
> 
> 
> bengt
> 
> 

Thanks for this solution. It seems great,

Jérôme





More information about the erlang-questions mailing list