Mobile code in Erlang

Ulf Wiger etxuwig@REDACTED
Wed Sep 27 16:25:14 CEST 2000

A couple of quick comments:

1. The OTP function most similar to this today is 
   application takeover. IOW, if you model your processes in an
   OTP application, you can migrate the application to another

2. It is your responsibility to make sure that exactly the same
   code is running on both nodes. In practice, if you use (1),
   the OTP boot scripts should also be, if not identical, at least
   well coordinated.

3. Performing takeover on demand using the stock OTP application
   controller is perhaps not as flexible as you'd want
   (see erl -man application), but it is possible to write your
   own distributed part of the application_controller. We've 
   done this at AXD 301, based on an initial prototype by 
   Martin Björklund. This is non-trivial to say the least.
   If you want to embark on this, I'll be happy to provide some
   hints, if not working example code.

4. You can write your own progress migration support. Basically,
   you'll want to start a new process on newnode and instruct it
   to fetch its state from its mate at mynode; fetching state
   is easily done through e.g. a gen_server call.

5. Dan Sahlin and Lawrie Brown have led some very interesting research
   called "Safe Erlang", which would solve several issues with
   mobile code (


On Wed, 27 Sep 2000, Juan A. Suárez Romero wrote:

>I'm interesting in a module that allow me to write mobile code in Erlang.
>Specially, I need a function "move_to (Node)" able to move the current process
>to another node.
>The function should work like this:
>4> node ().
>5> mobile:move_to ("newnode@REDACTED").
>6> node ().
>Somebody knows a module (or a function) like I need? Thanks in advance
> J.A.
>Dept. of Computer Science
>University of A Corunna (Spain)

Ulf Wiger                                    tfn: +46  8 719 81 95
Network Architecture & Product Strategies    mob: +46 70 519 81 95
Ericsson Telecom AB,              Datacom Networks and IP Services
Varuvägen 9, Älvsjö,                    S-126 25 Stockholm, Sweden

More information about the erlang-questions mailing list