Async and sync ops in IgniteQueue and IgniteSet implementations

2016-02-12 Thread Dood

Hello all,

This may be a very dumb question (and feel free to "reprimand" me ;-) 
but I will ask it anyways.


I am working on https://issues.apache.org/jira/browse/IGNITE-1144 and 
one of the comments on the submitted code was that I marked both methods 
I am implemented as @IgniteAsyncSupported but I never actually provided 
an async implementation. All my methods do is call on methods already 
implemented in IgniteCompute.java (after verifying that the methods are 
called on data structures that are collocated) and my assumption was 
that the methods being called are already implemented in async/sync 
versions. Specifically, these methods are affinityRun() and affinityCall().


Furthermore, I noticed the following comment in IgniteQueue.java, for 
example:

""* All queue operations have synchronous and asynchronous counterparts."".

However, after looking at all the implementations of IgniteQueue 
interface in the code base, I could not find any actual implementations 
of asynchronous calls on any methods of queue or set. Am I just missing 
something really basic?


Thanks!


Re: Async and sync ops in IgniteQueue and IgniteSet implementations

2016-02-12 Thread Valentin Kulichenko
Hi,

First of all, the JavaDoc is incorrect, there are no async counterparts for
queue and set operations in the current API.

The question is - do we need them? I think we should have have them for new
affinityRun and affinityCall methods that you're adding, but I'm not sure
about others.

Does anyone has thoughts on this?

-Val

On Fri, Feb 12, 2016 at 11:07 AM, Dood@ODDO  wrote:

> Hello all,
>
> This may be a very dumb question (and feel free to "reprimand" me ;-) but
> I will ask it anyways.
>
> I am working on https://issues.apache.org/jira/browse/IGNITE-1144 and one
> of the comments on the submitted code was that I marked both methods I am
> implemented as @IgniteAsyncSupported but I never actually provided an async
> implementation. All my methods do is call on methods already implemented in
> IgniteCompute.java (after verifying that the methods are called on data
> structures that are collocated) and my assumption was that the methods
> being called are already implemented in async/sync versions. Specifically,
> these methods are affinityRun() and affinityCall().
>
> Furthermore, I noticed the following comment in IgniteQueue.java, for
> example:
> ""* All queue operations have synchronous and asynchronous counterparts."".
>
> However, after looking at all the implementations of IgniteQueue interface
> in the code base, I could not find any actual implementations of
> asynchronous calls on any methods of queue or set. Am I just missing
> something really basic?
>
> Thanks!
>


Re: Async and sync ops in IgniteQueue and IgniteSet implementations

2016-02-12 Thread Dood

Val,

My question was also - if all I am doing is calling affinityRun() and 
affinityCall() that is already implemented elsewhere (just making sure 
it is done on a collocated queue/set) - do I need to do anything special 
looking at IgniteComputeImpl.java it looks like affinityRun()/Call() are 
already implemented in async fashion?)?


Thanks!

On 2/12/2016 1:49 PM, Valentin Kulichenko wrote:

Hi,

First of all, the JavaDoc is incorrect, there are no async counterparts for
queue and set operations in the current API.

The question is - do we need them? I think we should have have them for new
affinityRun and affinityCall methods that you're adding, but I'm not sure
about others.

Does anyone has thoughts on this?

-Val

On Fri, Feb 12, 2016 at 11:07 AM, Dood@ODDO  wrote:


Hello all,

This may be a very dumb question (and feel free to "reprimand" me ;-) but
I will ask it anyways.

I am working on https://issues.apache.org/jira/browse/IGNITE-1144 and one
of the comments on the submitted code was that I marked both methods I am
implemented as @IgniteAsyncSupported but I never actually provided an async
implementation. All my methods do is call on methods already implemented in
IgniteCompute.java (after verifying that the methods are called on data
structures that are collocated) and my assumption was that the methods
being called are already implemented in async/sync versions. Specifically,
these methods are affinityRun() and affinityCall().

Furthermore, I noticed the following comment in IgniteQueue.java, for
example:
""* All queue operations have synchronous and asynchronous counterparts."".

However, after looking at all the implementations of IgniteQueue interface
in the code base, I could not find any actual implementations of
asynchronous calls on any methods of queue or set. Am I just missing
something really basic?

Thanks!





Re: Async and sync ops in IgniteQueue and IgniteSet implementations

2016-02-12 Thread Valentin Kulichenko
For affinityRun and affinityCall you don't need to implement anything for
async support, because this is already supported by IgniteCompute. But you
have to add async support to the API as I described in earlier the ticket,
because currently there is no way to get the Future from queue or set.

-Val

On Fri, Feb 12, 2016 at 11:53 AM, Dood@ODDO  wrote:

> Val,
>
> My question was also - if all I am doing is calling affinityRun() and
> affinityCall() that is already implemented elsewhere (just making sure it
> is done on a collocated queue/set) - do I need to do anything special
> looking at IgniteComputeImpl.java it looks like affinityRun()/Call() are
> already implemented in async fashion?)?
>
> Thanks!
>
>
> On 2/12/2016 1:49 PM, Valentin Kulichenko wrote:
>
>> Hi,
>>
>> First of all, the JavaDoc is incorrect, there are no async counterparts
>> for
>> queue and set operations in the current API.
>>
>> The question is - do we need them? I think we should have have them for
>> new
>> affinityRun and affinityCall methods that you're adding, but I'm not sure
>> about others.
>>
>> Does anyone has thoughts on this?
>>
>> -Val
>>
>> On Fri, Feb 12, 2016 at 11:07 AM, Dood@ODDO  wrote:
>>
>> Hello all,
>>>
>>> This may be a very dumb question (and feel free to "reprimand" me ;-) but
>>> I will ask it anyways.
>>>
>>> I am working on https://issues.apache.org/jira/browse/IGNITE-1144 and
>>> one
>>> of the comments on the submitted code was that I marked both methods I am
>>> implemented as @IgniteAsyncSupported but I never actually provided an
>>> async
>>> implementation. All my methods do is call on methods already implemented
>>> in
>>> IgniteCompute.java (after verifying that the methods are called on data
>>> structures that are collocated) and my assumption was that the methods
>>> being called are already implemented in async/sync versions.
>>> Specifically,
>>> these methods are affinityRun() and affinityCall().
>>>
>>> Furthermore, I noticed the following comment in IgniteQueue.java, for
>>> example:
>>> ""* All queue operations have synchronous and asynchronous
>>> counterparts."".
>>>
>>> However, after looking at all the implementations of IgniteQueue
>>> interface
>>> in the code base, I could not find any actual implementations of
>>> asynchronous calls on any methods of queue or set. Am I just missing
>>> something really basic?
>>>
>>> Thanks!
>>>
>>>
>