Download Ignite 2.13.0
Apache Ignite

Compute APIs

Develop custom tasks in contemporary languages
and get the logic executed over a distributed cluster
Distributed In-Memory Cache

Execute Data-Intensive And Compute-Intensive Tasks At High Speed

Get an order-of-magnitude performance increase for custom complex logic:

By minimizing or avoiding network
utilization

By executing the logic straight on the
cluster nodes

Benefits Of Apache Ignite Compute APIs

Broadcast or execute
on specific nodes

– Broadcast your tasks to use all
the CPUs of your distributed cluster.

– Or schedule the tasks for execution on a subset of the nodes based
on custom criteria

Load balance your logic

If some of the nodes are overutilized, Ignite can automatically load-balance your computations to other nodes.

There are three ways to enable that:
– Round-robin load balancing
– Random and weighted load balancing
– Job stealing.

Execute computations
in a fault-tolerant way

Some computations might take minutes or hours to complete, e.g. drug discovery or logistics simulations.

You don't need to start from scratch if the execution fails in the middle. Restart a calculation from the point
of failure.

Forget about PLSQL, use
the language you code with daily

Create tasks in the language of your choice. You don’t need
to learn PLSQL any more.

JavaC#/.NETC++
 // Broadcast the task to server nodes only.
IgniteCompute compute = ignite.compute(ignite.cluster().forServers());

// Each remote server node will execute the logic of the task/lambda below.
compute.broadcast(() -> System.out.println(
"Hello Node: " + ignite.cluster().localNode().id()));
 // Broadcast the task to server nodes only.
var compute = ignite.GetCluster().ForServers().GetCompute();

// Each remote server node will execute the custom PrintNodeIdAction task.
compute.Broadcast(new PrintNodeIdAction());
  // Broadcast the task to server nodes only.
IgniteCompute compute = ignite.compute(ignite.cluster().forServers());

// Each remote server node will execute the logic of the task/lambda below.
compute.broadcast(() -> System.out.println(
"Hello Node: " + ignite.cluster().localNode().id()));

Example Of Logic Building

Execute the logic in place and eliminate network impact on the performance of the calculation

Imagine that a winter storm is about to hit a highly-populated city. As a telecommunication company, you have to send a text message to 20 million residents warning them about the blizzard.

With the client-server approach, the company would read 20 million records from a database to an application that executes some logic before finally sending a message to the residents.

A much more efficient approach would be to broadcast this logic to the cluster nodes that keep data about the city's residents. The logic gets executed on those nodes only and text messages are sent from there.

With the client-server approach, the company would read 20 million records from a database to an application that executes some logic before finally sending a message to the residents.

 Ignite ignite = ...

// NewYork ID.
long newYorkId = 2;

// Send the logic to the cluster node that stores NewYork and all its inhabitants.
ignite.compute().affinityRun("City", newYorkId, new IgniteRunnable() {

  @IgniteInstanceResource
  Ignite ignite;

  @Override
  public void run() {
    // Get access to the Person cache.
    IgniteCache<BinaryObject, BinaryObject> people = ignite.cache("Person").withKeepBinary();


    ScanQuery<BinaryObject, BinaryObject> query = new ScanQuery <BinaryObject, BinaryObject>();

    try (QueryCursor<Cache.Entry<BinaryObject, BinaryObject>> cursor = people.query(query)) {
      // Iteration over the local cluster node data using the scan query.
      for (Cache.Entry<BinaryObject, BinaryObject> entry : cursor) {
        BinaryObject personKey = entry.getKey();

        // Pick NewYorkers only.
        if (personKey.<Long>field("CITY_ID") == newYorkId) {
          person = entry.getValue();

          // Send the warning message to the person.

        }
      }
    }
  }
}