On Fri, Nov 8, 2013 at 1:35 PM, Mark S. Miller <[email protected]> wrote: (re: weakrefs and post-mortem finalization) > They are needed for many other things, such as > distributed acyclic garbage collection (as in adapting the CapTP ideas to > distributed JS).
I'm not convinced acyclic distributed GC is a good thing to support. JS users do not want RPC systems where one process's memory usage depends on getting per-object callbacks from an untrusted peer's GC implementation. There are already many ways to drop stuff from one process when another process probably doesn't need it anymore. It doesn't require nondeterministic language features. Consider, in the simplest case, "session data" (the capability in question is represented on the wire as an HTTP cookie) that expires on a timer. Or IPDL's managed hierarchy of actors <https://developer.mozilla.org/en-US/docs/IPDL/Tutorial#Subprotocols_and_Protocol_Management_>, where all references across a given link form a hierarchy, and a whole subtree can be dropped with a single message. This approach reduces traffic as well as opportunities for leak-inducing errors; and it's totally deterministic. Or consider Erlang—one of the best designs for distributed computing has no strong cross-process references at all. -j _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

