Distributed computations are performed in parallel fashion to gain high performance, low latency, and linear scalability. Ignite compute grid provides a set of simple APIs that allow users distribute computations and data processing across multiple computers in the cluster. Distributed parallel processing is based on the ability to take any computation and execute it on any set of cluster nodes and return the results back.
IgniteCompute interface provides methods for running many types of computations over nodes in a cluster or a cluster group. These methods can be used to execute Tasks or Closures in a distributed fashion.
All jobs and closures are guaranteed to be executed as long as there is at least one node standing. If a job execution is rejected due to lack of resources, a failover mechanism is provided. In case of failover, the load balancer picks the next available node to execute the job. Here is how you can get an
Ignite ignite = Ignition.ignite(); // Get compute instance over all nodes in the cluster. IgniteCompute compute = ignite.compute();
You can also limit the scope of computations to a Cluster Group. In this case, computation will only execute on the nodes within the cluster group.
Ignite ignite = Ignition.ignite(); ClusterGroup remoteGroup = ignite.cluster().forRemotes(); // Limit computations only to remote nodes (exclude local node). IgniteCompute compute = ignite.compute(remoteGroup);