[erlang-questions] Process migration/ Process state extraction/ injection
Tue Jul 31 22:18:43 CEST 2012
You could implement process migration yourself, I remember seeing
something like that implemented in ejabberd:
The idea is to spawn another process in the remote node, and use a
handover protocol to coordinate the migration.
On Tue, Jul 31, 2012 at 8:21 PM, Tyron Zerafa <> wrote:
> Hey again,
> I am thinking that a weaker form of such mobility might suffice for my
> project, but I am not sure. In this weaker form, it is enough to transfer
> the code and execution can restart again. I need this primary to implement
> the code-on-demand and remote-evaluation architectures. I do not believe
> that this is so complex in Erlang, in fact if I remember correctly some
> functionality already exists for such.
> On Tue, Jul 31, 2012 at 8:15 PM, Gleb Peregud <> wrote:
>> On Tue, Jul 31, 2012 at 8:11 PM, Tyron Zerafa <>
>> > Hey,
>> > My primary intention is to implement strong mobility of processes.
>> > Let's
>> > say that process A is running on Node 1, I want to be able to suspend
>> > this
>> > process, transfer it to Node 2 and resume such process from where it
>> > halted.
>> > I believe that in order to achieve such I need to somehow preserve the
>> > stack
>> > trace, memory and other info.
>> This task is non-trivial and will require a lot of work with ERTS and
>> whole Erlang VM. Things you have to handle are:
>> - stack
>> - heap
>> - binary refs
>> - monitors
>> - links
>> - ets ownership
>> - port ownership
>> - messages sent to old process pid?
>> - replacing old pid with new in other processes?
>> - replacing old process with "replay" process?
>> And I'm sure that those are not all details which will have to be handled.
> Best Regards,
> Tyron Zerafa
> erlang-questions mailing list
More information about the erlang-questions