[erlang-questions] Capability model?

Mark S. Miller markm@REDACTED
Thu Oct 26 00:18:25 CEST 2006


Jim Larson wrote:
> Joe Armstrong once floated a proposal for core Erlang syntax for
> RPC: "!!".  This may have been just syntactic sugar for a standard
> library call, instead of a true core mechanism - but it it were a
> true core mechanism, it could be made capability-safe.
> 
> A library-only change for capability-safe RPC would probably be
> worthwhile if the code change were the only cost - but we'd have
> to deal with the performance implications - processes and messages
> are cheap, but are they cheap enough to not suffer for an extra
> message and spawn/process cleanup per RPC call?  OTOH, any effort
> put into improving the compiler and runtime to minimize this extra
> overhead for capability-safe RPC would also yield great benefits
> for the system as a whole.

This does sound good. If necessary for performance, I imagine one could even 
define "!!" as a primitive whose semantics was defined by equivalence to an 
expansion involving a process spawn, but whose implementation used other 
means. If we believe we could do this if we needed to, then we can proceed 
assuming "!!" and postpone worrying about whether it expands to a spawn or is 
a new primitive.


> The Erlang practice of a global name table could be made more
> suitable for capability-safety by reinterpreting its use as syntactic
> sugar for an RPC to a name-to-pid mapping server - whose own pid
> would be stored in the - sigh - process dictionary.  By allowing
> installation of a new mapping server, we could then have containment.
> Similar changes would need to be made for the distributed Erlang
> functionality.

Why is this name table useful at all? Could you live without it? We have no 
such thing in E and we haven't missed it.

-- 
Text by me above is hereby placed in the public domain

     Cheers,
     --MarkM



More information about the erlang-questions mailing list