new syntax - a provocation
Tony Rogvall
tony@REDACTED
Fri Oct 3 09:15:48 CEST 2003
On Fri, 2003-10-03 at 05:02, Richard A. O'Keefe wrote:
> I wrote:
> It's interesting to consider the question: "what would an Erlang
> implementation have to be like for us to be able to take a running
> process and move it to another processor?" (IBM's AIX was able to
> do this on their mainframes, I believe. I think Kali Scheme can do it.
>
> I should also have mentioned the University of Washington "Emerald"
> system/language.
>
> Luke Gorrie <luke@REDACTED> asked:
>
> And also the question: why would you want to? Seriously.
>
> Surely the answer is obvious? To reduce *total* communication costs.
> Suppose you have two processes X and Y, and two machines A and B.
> Process X is running on A and Y is running on B.
>
Hi!
The reason why "we" never did implement moving of processes was that it
is not a "easy" in the general case. Just implementing the "move" is
nearly trivial. Dump the stack/heap code and send it away, not the issue
I think.
1. Normally when you want to move the process it is to late. system has
crashed.
2. You may want to move before the crash, but then you want to move the
resources with you i.e keep links / ports (files/sockets/drivers).
Otherwise you need to restart all the resources on the new location.
3. Suppose 1 and 2 does not apply, we still want the process and keep
the old identity. This means that some pid translation table must be
implemented, notifications are sent to the systems connected to the
system that hold the moved process. If the process own some resources
that we not want to move, then some proxy must be installed in place of
the process moved to keep the resources running. etc etc etc.
(It have not even started think about supervisor trees :-)
Why not just have a gen_server, then you pass the state
in a spawn call and let the application handle the problems with
accessing/moving external resources. PROBLEM SOLVED.
--
Tony Rogvall <tony@REDACTED>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20031003/2bffcff3/attachment.bin>
More information about the erlang-questions
mailing list