Getting Started with Apache® Ignite™ Tutorial (Part 6: Service Grid)

The Apache Ignite Service Grid will be the subject of this article in this blog series.

Service Grid

The main feature of the Apache Ignite Service Grid is to deploy services onto a cluster with availability and fault-tolerance. A counter or an ID generator would be simple examples of services.

A major use-case for the Service Grid is to deploy a Singleton. There are a number of different types of Singletons that Apache Ignite supports but two common types - Node Singleton and Cluster Singleton - are shown in Figure 1.

Figure 1. Node Singleton and Cluster Singleton

Figure 1. Node Singleton and Cluster Singleton

A Node Singleton is where a service runs on every node in the cluster. A Cluster Singleton is guaranteed to have only one cluster-wide instance of a service. If the server crashes on which the Cluster Singleton is deployed, the service will be automatically re-deployed onto another server. Another type of Singleton is a Key Singleton, where a service is attached to a key. If the key is moved within a cluster, the service will move with the key.

We can think of a Singleton as an edge-case and Apache Ignite actually provides more flexibility with services. For example, if more than one instance of a service needs to run, Apache Ignite will manage and run the required number of services.

A service may or may not have an interface. For example, an actual customer use-case was to deploy a Data Grid in AWS. The Data Grid required a one-time initialization with data loaded from an external source. The Data Grid had to wait until the initialization process was complete. Once the data were loaded, they were cached and available to the entire cluster. The requirement for the initialization was that a single node in the cluster, an example of a Cluster Singleton, performed the loading process. In this particular case, the service performed without any interface.

Increasingly, microservices architectures have become quite popular in recent years. Apache Ignite's Service Grid can form the foundation for a microservices architecture. For example, my colleague Dani Traphagen presented a session titled "Apache Ignite Service Grid: Foundation of Your Microservices-based Solution" at the In-Memory Computing Summit (IMCS) 2017 in Amsterdam.

Summary

The Apache Ignite Service Grid supports a number of powerful features and is fully integrated with the other components. It can also form the foundation for a modern microservices architecture.

Next time, we'll discuss the new Apache Ignite Machine Learning Grid.

This is part six of a seven-part series. You can find the rest of the series at the links below: