ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject Re: Async workers
Date Fri, 06 May 2016 12:08:10 GMT
Hi,

There is no way to get a task state from every node. The state of a particular task can be
taken only on the node that initiated its execution and only if the task is still running.
When a task is completed you have to store its result somewhere and pass to the client later.

In general if the task is still running you should execute  IgniteCompute.activeTaskFutures
on the originating node and check if it’s still in progress or not.

Makes sense?

—
Denis

> On May 6, 2016, at 11:23 AM, djm132 <dobermann132@gmail.com> wrote:
> 
> Hi, 
> 
> I have some confusion with implementing async task execution on cluster.
> There is own API server embedded along with ignite core in one application.
> API users execute http calls to some host as entry point and can be switched
> to another one on failover.
> 
> 	1) REST API server accepts client requests for some long-running job.
> 	2) After receiving API request there is a call to compute.run() and then I
> am getting task session id from compute.future().
> 	3) Task session id returned to user as API response.
> 	4) As I understand, this run() call directed by load balancer to some node.
> 	5) After some time, user requests API with previous taskId about task
> status and/or result.
> 
> The problem here - how can I get task state/result using only taskId from
> ANY cluster node (not initiated one) ? 
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Async-workers-tp4813.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Mime
View raw message