river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Wright <pdoubl...@gmail.com>
Subject Re: Distributed ExecutorService
Date Mon, 07 Dec 2009 07:23:17 GMT
There is a project called Swarm (http://code.google.com/p/swarm-dpl/)
which is exploring "moving the code to the data", using an interesting
approach of taking Scala continuations and moving them around the
network. I worked on a fork of their original demo code which took a
continuation, packaged it as an Entry, posted it to a space, then had
it retrieved by one or more other nodes with the result posted back to
the space to be retrieved by the originator. Each node could push the
entry back into the space with a new target node if there was more
processing needed. As far as Swarm goes, the cool thing about using
continuations for this is that from the programmer's point of view,
it's as if the method gets frozen half-way through a code block, then
resumes execution on the target node.

Point being, both with Swarm and with your idea, I'm not sure what
using Jini instead of JavaSpaces buys you here. It seems like what
you're describing is a perfect fit for a space-based design. You can
package the space operations behind an API so that it looks more like
a service call, or like an actor message send, but the delivery
mechanism is space-based. It has a big advantage that assuming your
original write succeeds, the entry will remain there until
successfully processed.

Just a thought,

View raw message