In-Memory Compute Grid
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.
Ignite ignite = Ignition.ignite(); // Print out hello message on all cluster nodes. ignite.compute().broadcast(() -> System.out.println("Hello Node!"));
Collection<IgniteCallable<Integer>> calls = new ArrayList<>(); // Iterate through all words in the sentence and create callable jobs. for (String word : "How Many Characters".split(" ")) calls.add(word::length); // Execute collection of callables on the Ignite cluster. Collection<Integer> res = ignite.compute().call(calls); // Add all the word lengths received from cluster nodes. int total = res.stream().mapToInt(Integer::intValue).sum();
IgniteCompute compute = ignite.compute(); // Execute closure on all cluster nodes. Collection<Integer> res = ignite.compute().apply( String::length, Arrays.asList("How Many Characters".split(" ")) ); // Add all the word lengths received from cluster nodes. int total = res.stream().mapToInt(Integer::intValue).sum();
Compute Grid Features
|Distributed Closure Execution||
Ignite compute grid allows to broadcast and load-balance any closure within the cluster or a cluster group, including Java 8 lambdas, as well as plain Java runnables and callables.
However, when computing on data that resides in-memory, real-time low latencies
and high throughput usually take the highest priority. Also, simplicity of the API
becomes very important as well. With that in mind, Ignite introduced the
Ignite provides a cluster-enabled implementation of standard JDK
|Collocation of Compute & Data||
Collocation of computations with data allow for minimizing data serialization within the network and can significantly improve performance and scalability of your application. Whenever possible, you should always make best effort to collocate your computations with the cluster nodes caching the data that needs to be processed.
Ignite provides various ways to collocate compute with data either automatically or manually as needed.
Ignite supports automatic job failover. In case of a node crash or any other error,
jobs are automatically transferred to other available nodes for re-execution.
At Least Once Guarantee - Ignite guarantees that as long as there is at least one node standing, no job will ever be lost.
Load balancing component balances job distribution among cluster nodes. In Ignite
load balancing is achieved via a pluggable
In homogeneous environments with homogeneous tasks load balancing is achieved by random or round-robin policies. However, in many other use cases, especially under uneven load, more complex adaptive load-balancing policies are provided.
Checkpointing is supported via a pluggable