New paper: "Distributed Electronic Rights in JavaScript"

Kevin Reid kpreid at google.com
Tue Jan 15 10:19:12 PST 2013


On Tue, Jan 15, 2013 at 2:20 AM, David Bruant <bruant.d at gmail.com> wrote:

> Practice of the event loop model in JavaScript has proven that the
> share-nothing model has limitations. In my opinion, one of the reasons
> WebWorkers aren't used is that the share-nothing model imposes to copy data
> when one wants 2 WebWorkers to communicate.
> This resulted in the addition of Transferable objects in JavaScript [1].
> Rust introduced the notion of unique pointer [2] for equivalent reasons.
>

>From a capability viewpoint, there are non-performance reasons to have the
same pattern, even within a given event loop, namely resources which may be
transferred with observably exclusive access (ownership); the pattern is to
have an operation on the resource which generates a new reference to it
(i.e. a new object, from the OO perspective) and makes the old one useless
("revoked").

One could then argue that the share-nothing model + transferables is simply
the decision, at the platform level, that similarly excluding
access-from-multiple-threads is so valuable that we don't even let
individual programs decide not to do it.

Also, I can describe Transferable from an E perspective (not that it is
idiomatic to actually do that, but that it is possible to implement) by
saying that the serialization of the transferable object has the side
effect of performing such an exclusive transfer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130115/26a94727/attachment.html>


More information about the es-discuss mailing list