Affinity aware version of ICompute.Apply() in Ignite C# client

classic Classic list List threaded Threaded
3 messages Options
Raymond Wilson Raymond Wilson
Reply | Threaded
Open this post in threaded view
|

Affinity aware version of ICompute.Apply() in Ignite C# client

I have a current workflow where I use ICompute.Apply() and ICompute.BroadCast to execute a compute function with an argument and return a response. In the former I want any one of a number of nodes in the projection to execute the compute func, in the latter I want all the nodes to execute the compute func.

I have a new workflow where I want to execute a compute func with an argument on a node based on an affinity key.

ICompute defines AffinityCall() which takes a cache name, an affinity key relevant to the cache, and a compute func, then returns a result. However, unlike Apply and Broadcast it does not accept an argument parameter.

Looking through the ICompute interface it seems that there is no similar method available that does take an argument.

Two questions:

- Is this a capability defined in the Java client but not yet available in the C# client?
- If not, is the standard practice to include the argument into the compute func state that is sent to the node to execute it?

Thanks,
Raymond.


ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Affinity aware version of ICompute.Apply() in Ignite C# client

>  - Is this a capability defined in the Java client but not yet available in the C# client?
There is no such API in Java AFAIK

>  - If not, is the standard practice to include the argument into the compute func state that is sent to the node to execute it? 
Yes


Thanks,
Pavel 



On Thu, Mar 7, 2019 at 11:19 PM Raymond Wilson <[hidden email]> wrote:
I have a current workflow where I use ICompute.Apply() and ICompute.BroadCast to execute a compute function with an argument and return a response. In the former I want any one of a number of nodes in the projection to execute the compute func, in the latter I want all the nodes to execute the compute func.

I have a new workflow where I want to execute a compute func with an argument on a node based on an affinity key.

ICompute defines AffinityCall() which takes a cache name, an affinity key relevant to the cache, and a compute func, then returns a result. However, unlike Apply and Broadcast it does not accept an argument parameter.

Looking through the ICompute interface it seems that there is no similar method available that does take an argument.

Two questions:

- Is this a capability defined in the Java client but not yet available in the C# client?
- If not, is the standard practice to include the argument into the compute func state that is sent to the node to execute it?

Thanks,
Raymond.


Raymond Wilson Raymond Wilson
Reply | Threaded
Open this post in threaded view
|

Re: Affinity aware version of ICompute.Apply() in Ignite C# client

Thanks Pavel :)

Sent from my iPhone

On 8/03/2019, at 9:47 PM, Pavel Tupitsyn <[hidden email]> wrote:

>  - Is this a capability defined in the Java client but not yet available in the C# client?
There is no such API in Java AFAIK

>  - If not, is the standard practice to include the argument into the compute func state that is sent to the node to execute it? 
Yes


Thanks,
Pavel 



On Thu, Mar 7, 2019 at 11:19 PM Raymond Wilson <[hidden email]> wrote:
I have a current workflow where I use ICompute.Apply() and ICompute.BroadCast to execute a compute function with an argument and return a response. In the former I want any one of a number of nodes in the projection to execute the compute func, in the latter I want all the nodes to execute the compute func.

I have a new workflow where I want to execute a compute func with an argument on a node based on an affinity key.

ICompute defines AffinityCall() which takes a cache name, an affinity key relevant to the cache, and a compute func, then returns a result. However, unlike Apply and Broadcast it does not accept an argument parameter.

Looking through the ICompute interface it seems that there is no similar method available that does take an argument.

Two questions:

- Is this a capability defined in the Java client but not yet available in the C# client?
- If not, is the standard practice to include the argument into the compute func state that is sent to the node to execute it?

Thanks,
Raymond.