natively negotiating sync vs. async...without callbacks
Mark S. Miller
erights at google.com
Tue Dec 7 15:39:39 PST 2010
[+ravi]
Hi Kyle, you may also be interested in taking a look at the strawman at <
http://wiki.ecmascript.org/doku.php?id=strawman:concurrency> and the Orleans
paper and video just announced in the email below. One lesson to take from
these (and similar systems going back to Actors) is: once you support
asynchronous interactions between objects well, you are already most of the
way towards supporting distributed object computing. Since JavaScript in
practice (Browsers with postMessage and WebWorkers, async xhr, NodeJS) is
already de-facto using communicating event loop concurrency, this seems like
a natural step. We're already using the abstractions on that strawman page
via the ref_send libraries, but without the syntactic support proposed by
that strawman.
The kind of local chaining you're talking about can be expressed
straightforwardly using Q.when, though a bit verbosely because of the
"function" and "return" keywords. If we had a shorter function syntax, e.g.,
"#" for "function" and "(expression)" for "{ return expression; }", then we
could code your example as
const xP = X(1,2);
const yP = Q.when(xP, #(x) (Y(3,4)));
const zP = Q.when(yP, #(y) (Z("foo")));
This still seems much more verbose, but it accomplishes something else that
you typically want: it brings the resolution of each expression into scope
(x, y) for use within the body of the next one.
---------- Forwarded message ----------
From: Ravi Pandya <ravi at iecommerce.com>
Date: Fri, Dec 3, 2010 at 6:35 AM
Subject: [e-lang] Orleans framework for cloud computing
To: e-lang at mail.eros-os.org
I've been working on a project in Microsoft Research that builds on some
ideas from E and related work - promises, turn-based execution,
object-capability patterns, etc. It is a framework and runtime for writing
distributed applications to run in the cloud (and eventually on the client
as well). It also includes functionality such as optimistic lightweight
transactions, transparent persistence, and object replication &
synchronization. We're not yet ready to release the code externally, but we
have published a technical report and an online video describing the
project. I'd be interested in your comments.
Tech report:
http://research.microsoft.com/apps/pubs/?id=141999
Video:
http://channel9.msdn.com/Shows/Going+Deep/Project-Orleans-A-Cloud-Computing-
Framework
Thanks,
Ravi
_______________________________________________
e-lang mailing list
e-lang at mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20101207/dfd88005/attachment-0001.html>
More information about the es-discuss
mailing list