<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ok, so addLocalTask() will cause the task to run on the remote node, and addGlobalTask() causes the task to run on the local node? &nbsp;:-)<div><br><div><div>On 1 Dec 2010, at 13:05, Vladimir Blagojevic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">
    On 10-12-01 8:07 AM, Manik Surtani wrote:
    <blockquote cite="mid:36F0EDD0-1D65-48D7-BEEF-0728F0E9C700@jboss.org" type="cite">
      <pre wrap="">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.
</pre>
    </blockquote>
    <tt>Their specifics are determined as they are added to "coordinated
      task", I am sure we can tune this to requirements we need</tt>.<br>
    <pre class="jive-pre"><code class="jive-code jive-java">CacheManager cm = ...;
CoordinatedTask task = cm.newCoordinatedTask(<font color="red">"finalOutcomeCacheName"</font>);
cm.addLocalTask(<font color="navy"><b>new</b></font> GridFileQuery(<font color="red">"my_gridfs"</font>));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="darkgreen">// Fetch</font>
cm.addLocalTask(<font color="navy"><b>new</b></font> GridFileSizeCounter());&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="darkgreen">// Map</font>
cm.addGlobalTask(<font color="navy"><b>new</b></font> IntegerSummarizer(<font color="red">"my_gridfs_size"</font>); <font color="darkgreen">// Reduce</font></code></pre>
    <br>
  </div>

_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>