Ok, so addLocalTask() will cause the task to run on the remote node, and addGlobalTask()
causes the task to run on the local node? :-)
On 1 Dec 2010, at 13:05, Vladimir Blagojevic wrote:
On 10-12-01 8:07 AM, Manik Surtani wrote:
>
> No, in terms of which tasks are executed 'locally' and which tasks are
executed 'remotely'.
>
> E.g., there are concievably 3 types of tasks:
>
> 1) Tasks that are data intensive, that should be executed on a remote node, close to
the actual data
> 2) Aggregation of results of these data intensive tasks, which should happen on
remote nodes as well, before transmitting any results back to the caller
> 3) Aggregation of several results on the caller.
>
> Now each of these tasks can be chained - I think there definitely is value in that.
Their specifics are determined as they are added to "coordinated task", I am
sure we can tune this to requirements we need.
CacheManager cm = ...;
CoordinatedTask task = cm.newCoordinatedTask("finalOutcomeCacheName");
cm.addLocalTask(new GridFileQuery("my_gridfs")); // Fetch
cm.addLocalTask(new GridFileSizeCounter()); // Map
cm.addGlobalTask(new IntegerSummarizer("my_gridfs_size"); // Reduce
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org