You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey N. Gura (Jira)" <ji...@apache.org> on 2023/05/15 11:44:00 UTC

[jira] [Updated] (IGNITE-16613) [Compute Grid] IgniteCompute facade and ComputeJob interface

     [ https://issues.apache.org/jira/browse/IGNITE-16613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey N. Gura updated IGNITE-16613:
------------------------------------
    Labels: iep-100 ignite-3  (was: ignite-3)

> [Compute Grid] IgniteCompute facade and ComputeJob interface
> ------------------------------------------------------------
>
>                 Key: IGNITE-16613
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16613
>             Project: Ignite
>          Issue Type: Task
>          Components: compute
>            Reporter: Sergey Chugunov
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: iep-100, ignite-3
>             Fix For: 3.0.0-alpha5
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> On the first phase we want to define a facade in ignite-api module with support only simple remote job execution.
> API of the facade:
> {code:java}
> public interface IgniteCompute {
>   // Executes a job represented by the given class on one node from the nodes set.
>   <R> CompletableFuture<R> execute(Set<ClusterNode> nodes, Class<? Extends ComputeJob<R>> cls, Object … args);
>   // Executes a job represented by the given class on one node where the given key is located.
>   <R> CompletableFuture<R> executeColocated(String table, K key, Class<? extends ComputeJob<R>> cls, Object … args);
>   // Executes a job represented by the given class on all nodes from the given nodes set.
>   <R> Map<ClusterNode,CompletableFuture<R>> broadcast(Set<ClusterNode> nodes, Class<? extends ComputeJob<R>> cls, Object … args);
> }
> {code}
> It supports the simplest operations only and leaves aside more sophisticated scenarios like broadcast or operations requiring code deployment.
> ComputeJob interface looks like this:
> {code}
> public interface ComputeJob<R> {
>     R execute(JobExecutionContext ctx, Object … args);
> }
> {code}
> JobExecutionContext here is needed for passing Ignite instance of the local node where the job is started but can be extended with more session parameters.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)