Vladimir,
Here are some thoughts on your latest iteration (Version 8) of this page:
http://community.jboss.org/wiki/InfinispanDistributedExecutionFramework
There are actually 2 distinct use cases that this feature would touch:
1) pushing a Callable to the node where state is located and pull back a result
2) breaking up a task into Callables and then pushing the Callables out as per (1).
Now only (2) is true map/reduce (and relevant to fork/join) but for many cases, (1) alone
is enough. So whatever API we propose should support both. Simple remote code execution
to leverage data locality where the user doesn't care about breaking up tasks into
subtasks, as well as proper task decomposition.
But we should be clear about these differences - even though on an impl level they are
very closely related. The stuff you have so far handles case (2) pretty well but we
should also expose (1).
Some other feedback:
* I presume distributed task monitoring and annotations are sections that come under
"outside of scope"? They seem to be on the same level so I wasn't sure of
your intentions here.
* Proposed interfaces - Not sure if I understand the purpose of
DistributedCallable#mapped(). You already assign a cache to the callable in
DistributedCallable#initialized(), right?
* DistributedCallable#preferredExecutionNodes() - do we really want to support this at
this stage? Or is it better to not support arbitrary node selection by end-user code?
Simpler would be to add a DistributedCallable#getRelatedKeys() which returns a Set of keys
which the callable would be expected to touch, so we can decide where to route the task.
Or maybe you want to offer both forms, so that a DistributedCallable could *either*
provide a set of nodes to execute on or a set of keys which it expects to touch.
Cheers
Manik
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org