Orc vs flapjax

6 views
Skip to first unread message

titto

unread,
Sep 17, 2009, 5:04:30 PM9/17/09
to Flapjax
Hi,

I have recently discovered Orc (http://orc.csres.utexas.edu), it seems
to be rather similar to flapjax in spirit.

From a quick reading of the tutorial it seems to be based on just
three coordination primitives (roughly speaking an OR, and AND and an
ONCE).

I didn't see Orc mentioned in the OOPSLA paper so I wondered if the
flapjax designers would be interested in providing a quick comparison
of the two systems.

Maybe showing how the Orc primitives map to the flapjax ones (or do
not).

Thanks,

titto

therac25

unread,
Sep 17, 2009, 8:13:21 PM9/17/09
to Flapjax
Funny, I've been looking at Oni (http://www.croczilla.com/oni) which
is inspired by Orc

I found myself wanting something like 'Par' (http://www.croczilla.com/
oni/reference/#par-fork-join-parallel-execution), when adding numbers
returned asynchronously. The sum needs to be displayed only when
we've received (and added) all the numbers

I ended up with:

var x = getWebServiceObjectE(oneE(request));
var y = getWebServiceObjectE(oneE(request));
mergeE(x,y).collectE(0,function(elt,sum) { return sum + Number
(elt); })
.skipFirstE()
.mapE(function(msg){ alert(msg); });

I used skipFirstE to get notified only when both ajax calls have
completed, but that forces me to do the bookeeping...

I am sure there's a nicer way to do this...
Reply all
Reply to author
Forward
0 new messages