You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Taras Ledkov <tl...@gridgain.com> on 2017/01/20 14:18:34 UTC

Re: Make async API great again

Gents

I've done changes of the IgniteCompute as a subtask of the whole async 
API refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
Please check the new version of the public API 
(https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java)

Please look through the new API and let me know any comments.

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: Make async API great again

Posted by Sergei Egorov <bs...@gmail.com>.
Cool!

Please check my neighboring thread about special .to() method on
IgniteFuture to make it even better :)

On Mon, Mar 27, 2017 at 1:32 PM Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Igniters,
>
> I am glad to announce that old async-style is finally deprecated and now
> all asynchronous methods are defined explicitly! Woohoo! Thanks to Taras
> for this important contribution.
>
> On Mon, Jan 23, 2017 at 6:12 PM, Taras Ledkov <tl...@gridgain.com>
> wrote:
>
> > Each compute method produces task. For 'run', 'call' etc. methods the
> > classes of tasks are internal.
> > There are tests checking the task session by ComputeTaskFuture for these
> > methods.
> > I think we have to leave real class of future is
> > ComputeTaskInternalFuture#ComputeFuture to compatibility.
> >
> > The class of the future at the public API may be changed.
> >
> >
> >
> > On 20.01.2017 17:54, Vladimir Ozerov wrote:
> >
> >> IgniteCompute was designed this way initially. See
> IgniteCompute.future()
> >> override. May be it makes sense to leave this type only for execute(...)
> >> methods.
> >>
> >> On Fri, Jan 20, 2017 at 5:45 PM, Semyon Boikov <sb...@gridgain.com>
> >> wrote:
> >>
> >> Hi Taras,
> >>>
> >>> Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
> >>> seems that ComputeTaskFuture is needed only for tasks?
> >>>
> >>>
> >>>
> >>>
> >>> On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com>
> >>> wrote:
> >>>
> >>> Gents
> >>>>
> >>>> I've done changes of the IgniteCompute as a subtask of the whole async
> >>>>
> >>> API
> >>>
> >>>> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
> >>>> Please check the new version of the public API (
> >>>> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
> >>>> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
> >>>> org/apache/ignite/IgniteCompute.java)
> >>>>
> >>>> Please look through the new API and let me know any comments.
> >>>>
> >>>> --
> >>>> Taras Ledkov
> >>>> Mail-To: tledkov@gridgain.com
> >>>>
> >>>>
> >>>>
> > --
> > Taras Ledkov
> > Mail-To: tledkov@gridgain.com
> >
> >
>

Re: Make async API great again

Posted by Denis Magda <dm...@apache.org>.
Promising beginning of the week! So many talks in the past and finally we came to the logical end.

Thanks to both of you Taras and Vovan to making this real ;)

Could any of you update the Migration Guide simplifying the life for those who will be migrating from AI 1.x?
https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+2.0+Migration+Guide <https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+2.0+Migration+Guide>

—
Denis

> On Mar 27, 2017, at 3:24 AM, Vladimir Ozerov <vo...@gridgain.com> wrote:
> 
> Igniters,
> 
> I am glad to announce that old async-style is finally deprecated and now
> all asynchronous methods are defined explicitly! Woohoo! Thanks to Taras
> for this important contribution.
> 
> On Mon, Jan 23, 2017 at 6:12 PM, Taras Ledkov <tl...@gridgain.com> wrote:
> 
>> Each compute method produces task. For 'run', 'call' etc. methods the
>> classes of tasks are internal.
>> There are tests checking the task session by ComputeTaskFuture for these
>> methods.
>> I think we have to leave real class of future is
>> ComputeTaskInternalFuture#ComputeFuture to compatibility.
>> 
>> The class of the future at the public API may be changed.
>> 
>> 
>> 
>> On 20.01.2017 17:54, Vladimir Ozerov wrote:
>> 
>>> IgniteCompute was designed this way initially. See IgniteCompute.future()
>>> override. May be it makes sense to leave this type only for execute(...)
>>> methods.
>>> 
>>> On Fri, Jan 20, 2017 at 5:45 PM, Semyon Boikov <sb...@gridgain.com>
>>> wrote:
>>> 
>>> Hi Taras,
>>>> 
>>>> Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
>>>> seems that ComputeTaskFuture is needed only for tasks?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com>
>>>> wrote:
>>>> 
>>>> Gents
>>>>> 
>>>>> I've done changes of the IgniteCompute as a subtask of the whole async
>>>>> 
>>>> API
>>>> 
>>>>> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
>>>>> Please check the new version of the public API (
>>>>> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
>>>>> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
>>>>> org/apache/ignite/IgniteCompute.java)
>>>>> 
>>>>> Please look through the new API and let me know any comments.
>>>>> 
>>>>> --
>>>>> Taras Ledkov
>>>>> Mail-To: tledkov@gridgain.com
>>>>> 
>>>>> 
>>>>> 
>> --
>> Taras Ledkov
>> Mail-To: tledkov@gridgain.com
>> 
>> 


Re: Make async API great again

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Igniters,

I am glad to announce that old async-style is finally deprecated and now
all asynchronous methods are defined explicitly! Woohoo! Thanks to Taras
for this important contribution.

On Mon, Jan 23, 2017 at 6:12 PM, Taras Ledkov <tl...@gridgain.com> wrote:

> Each compute method produces task. For 'run', 'call' etc. methods the
> classes of tasks are internal.
> There are tests checking the task session by ComputeTaskFuture for these
> methods.
> I think we have to leave real class of future is
> ComputeTaskInternalFuture#ComputeFuture to compatibility.
>
> The class of the future at the public API may be changed.
>
>
>
> On 20.01.2017 17:54, Vladimir Ozerov wrote:
>
>> IgniteCompute was designed this way initially. See IgniteCompute.future()
>> override. May be it makes sense to leave this type only for execute(...)
>> methods.
>>
>> On Fri, Jan 20, 2017 at 5:45 PM, Semyon Boikov <sb...@gridgain.com>
>> wrote:
>>
>> Hi Taras,
>>>
>>> Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
>>> seems that ComputeTaskFuture is needed only for tasks?
>>>
>>>
>>>
>>>
>>> On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>> Gents
>>>>
>>>> I've done changes of the IgniteCompute as a subtask of the whole async
>>>>
>>> API
>>>
>>>> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
>>>> Please check the new version of the public API (
>>>> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
>>>> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
>>>> org/apache/ignite/IgniteCompute.java)
>>>>
>>>> Please look through the new API and let me know any comments.
>>>>
>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>
>>>>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>

Re: Make async API great again

Posted by Taras Ledkov <tl...@gridgain.com>.
Each compute method produces task. For 'run', 'call' etc. methods the 
classes of tasks are internal.
There are tests checking the task session by ComputeTaskFuture for these 
methods.
I think we have to leave real class of future is 
ComputeTaskInternalFuture#ComputeFuture to compatibility.

The class of the future at the public API may be changed.


On 20.01.2017 17:54, Vladimir Ozerov wrote:
> IgniteCompute was designed this way initially. See IgniteCompute.future()
> override. May be it makes sense to leave this type only for execute(...)
> methods.
>
> On Fri, Jan 20, 2017 at 5:45 PM, Semyon Boikov <sb...@gridgain.com> wrote:
>
>> Hi Taras,
>>
>> Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
>> seems that ComputeTaskFuture is needed only for tasks?
>>
>>
>>
>>
>> On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com>
>> wrote:
>>
>>> Gents
>>>
>>> I've done changes of the IgniteCompute as a subtask of the whole async
>> API
>>> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
>>> Please check the new version of the public API (
>>> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
>>> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
>>> org/apache/ignite/IgniteCompute.java)
>>>
>>> Please look through the new API and let me know any comments.
>>>
>>> --
>>> Taras Ledkov
>>> Mail-To: tledkov@gridgain.com
>>>
>>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: Make async API great again

Posted by Vladimir Ozerov <vo...@gridgain.com>.
IgniteCompute was designed this way initially. See IgniteCompute.future()
override. May be it makes sense to leave this type only for execute(...)
methods.

On Fri, Jan 20, 2017 at 5:45 PM, Semyon Boikov <sb...@gridgain.com> wrote:

> Hi Taras,
>
> Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
> seems that ComputeTaskFuture is needed only for tasks?
>
>
>
>
> On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com>
> wrote:
>
> > Gents
> >
> > I've done changes of the IgniteCompute as a subtask of the whole async
> API
> > refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
> > Please check the new version of the public API (
> > https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
> > 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
> > org/apache/ignite/IgniteCompute.java)
> >
> > Please look through the new API and let me know any comments.
> >
> > --
> > Taras Ledkov
> > Mail-To: tledkov@gridgain.com
> >
> >
>

Re: Make async API great again

Posted by Semyon Boikov <sb...@gridgain.com>.
Hi Taras,

Why 'async' methods return ComputeTaskFuture, not just IgniteFuture? It
seems that ComputeTaskFuture is needed only for tasks?




On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com> wrote:

> Gents
>
> I've done changes of the IgniteCompute as a subtask of the whole async API
> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
> Please check the new version of the public API (
> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
> org/apache/ignite/IgniteCompute.java)
>
> Please look through the new API and let me know any comments.
>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>

Re: Make async API great again

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Very cool! Clean and straightforward.

P.S.: If someone doesn't understand the fix - please look at new methods
with "async" suffix [1].

[1] https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
org/apache/ignite/IgniteCompute.java

On Fri, Jan 20, 2017 at 5:18 PM, Taras Ledkov <tl...@gridgain.com> wrote:

> Gents
>
> I've done changes of the IgniteCompute as a subtask of the whole async API
> refactoring (https://issues.apache.org/jira/browse/IGNITE-4580).
> Please check the new version of the public API (
> https://github.com/gridgain/apache-ignite/blob/b81621bf2e8a
> 35b20989f95ff52c0f6d91dd75d6/modules/core/src/main/java/
> org/apache/ignite/IgniteCompute.java)
>
> Please look through the new API and let me know any comments.
>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>