[erlang-questions] Persistent processes

Kirill Zaborski qrilka@REDACTED
Tue Jul 10 16:06:40 CEST 2007


So the persistent process calls some module:perstist_state(SomeState)?
And then after restart some utility process runs
persistent_process:start(SomeState)?
Quite reasonable, thanks.

Regards,
Kirill.

On 7/10/07, Ladislav Lenart <lenartlad@REDACTED> wrote:
Kirill Zaborski wrote:
> > Is there some way to do subj? I.e. I'd like to spawn a process, then I
> > turn off Erlang emulator and just before that I write the state of the
> > process to the disk. I see erlang:hibernate and sys:suspend but no
> > info about processes surviving emulator restart.
> > The question may seem strange but how can I implement such a behaviour?
>
> Hello,
>
> as far as I know there is no BIF that can do that. But
> process in question can store persistent portion of its
> state in a mnesia table (identified by unique address)
> after each checkpoint (for example after each request
> or after some period of time). Then you can have another
> (ram_copies) table which maps addresses to actual process
> pids. If the process state table is of type disc_copies
> you have persistent processes.
>
> At least this is how we are doing it (work still in progress).
>
> Hope this helps,
>
> Ladislav Lenart
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list