<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 8:13 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">On 27 February 2014 16:58, Mircea Markus &lt;<a href="mailto:mmarkus@redhat.com">mmarkus@redhat.com</a>&gt; wrote:<br>


&gt;<br>
&gt; On Feb 27, 2014, at 3:28 PM, Vladimir Blagojevic &lt;<a href="mailto:vblagoje@redhat.com">vblagoje@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hmm very good points Sanne. Yeah I think we can have a contract that<br>
&gt;&gt; returns an Address were task was executed.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt; Vladimir<br>
&gt;&gt; On 2/26/2014, 4:25 PM, Sanne Grinovero wrote:<br>
&gt;&gt;&gt; I&#39;m a bit skeptical.<br>
&gt;&gt;&gt; It might sound a sensible request currently, but if you do so you<br>
&gt;&gt;&gt; inherently &quot;promise&quot; that tasks are going to be executed on a specific<br>
&gt;&gt;&gt; server; AFAIK we promise execution on data locality,<br>
&gt;<br>
&gt; We allow execution to be bound on a specific address: <a href="http://goo.gl/H5qTJZ" target="_blank">http://goo.gl/H5qTJZ</a><br>
<br>
</div>I know but I think that smells :)<br>
Stuff like _Address_ should be an implementation detail. Maybe one day<br>
you&#39;ll see why and we&#39;ll deprecate it ;-)<br>
<div class=""><br>
&gt; I see your point with data locality vs. specific server.<br>
&gt;<br>
&gt;<br>
&gt;&gt;&gt; but maintaining a<br>
&gt;&gt;&gt; good level of flexibility you can evolve your system to smarter load<br>
&gt;&gt;&gt; balancing of tasks, failover operations, etc..<br>
&gt;&gt;&gt; If you expose execution details, you won&#39;t be able to develop any of<br>
&gt;&gt;&gt; that in future.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; To make an example from the database world - seems the analogy is<br>
&gt;&gt;&gt; common these days - it&#39;s like you run a SELECT statement but want to<br>
&gt;&gt;&gt; pick which CPU core is going to be used. That would be really odd, as<br>
&gt;&gt;&gt; you would take away the option from the scheduler to make an effective<br>
&gt;&gt;&gt; choice.<br>
&gt;&gt;&gt; Still, this approach might be desirable for a database which doesn&#39;t<br>
&gt;&gt;&gt; do any smart scheduling.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Some of these concerns might be mitigated if you return the Address of<br>
&gt;&gt;&gt; where the task *was* executed, after it&#39;s done. I still don&#39;t think it<br>
&gt;&gt;&gt; should be of user&#39;s interest but at least you would be able to<br>
&gt;&gt;&gt; implement rescheduling or failover policies in future.<br>
&gt;<br>
&gt; We already have failure policies in place, but the user only needs to audit the failure, not to failover. If users are interested on knowing the failures, another way of doing it is the current future, in the Future.get to throw a custom exception (subclass of ExecutionException) containing as information where the execution failed.<br>


<br>
</div>Right, but the question is if the user really wants to know the<br>
intermediate failures? I suspect that if someone asks for this, he&#39;s<br>
actually wishing to implement his own failower policy &amp; monitoring.<br>
&gt;From the point of view of someone running a database query, I think<br>
the user would love to ignore issues altogether, but the real world<br>
forces him to at least consider that the whole operation might fail.<br>
Sending him specific notifications or exceptions of something that was<br>
succesfull but was actually run on a different resource set than what<br>
was originally planned is I&#39;d say an exotic request.<br></blockquote><div><br></div><div>I don&#39;t think the user was after the address of the &quot;real&quot; executing node, I believe he just wanted a way to map each Future to the target address doing a submitEverywhere(task).</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I like the idea of providing additional information in a Future<br>
subtype, but I don&#39;t think you should throw it on a get() operation.<br>
You could simply add getters to the FutureExtended to retrieve like an<br>
execution plan history, a trace of intermediate failures, etc.<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>That sounds good, but we shouldn&#39;t limit that to just the result of one distributed task execution. We could take the opportunity to return something other than List&lt;Future&gt; from submitEverywhere(task) as well, doing a foreach to get all the results is a bit tedious. And even if we&#39;d like users to treat the results from different nodes as interchangeable, sometimes they&#39;re not, so a way of getting the result from one particular node would also be useful.<br>

<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><font color="#888888">
Sanne<br>
</font></span><div class=""><div class="h5"><br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Sanne<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 26 February 2014 19:31, Vladimir Blagojevic &lt;<a href="mailto:vblagoje@redhat.com">vblagoje@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; Hey,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; There is an interesting request from community to include an Address along with a Future returned for a subtask being executed [1].<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I think it makes sense what this user wants. We might create Future sub interface that has getAddress method and we can return an object implementing that interface instead of plain Future. In some new major release we can officially change the signature of these DistributedExecutorService methods to return i.e TargetedFuture - it would not break existing clients. Maybe even make TargetedFuture extend NotifyingFuture.<br>


&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Any thoughts?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Vladimir<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; [1] <a href="https://community.jboss.org/thread/237442" target="_blank">https://community.jboss.org/thread/237442</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt; Cheers,<br>
&gt; --<br>
&gt; Mircea Markus<br>
&gt; Infinispan lead (<a href="http://www.infinispan.org" target="_blank">www.infinispan.org</a>)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>