What is a Data Grid?
In-Memory Data Grid is a concept that facilitates caching by creating a high-speed data storage layer that volatilely stores information in memory. Thanks to this, we can avoid delays in query time or complex calculations that have been previously performed.
There are two types of cache:
- Local cache: it is contained within the application itself
- Distributed system cache: it is deployed in one or several nodes forming a large logical cache, sharing different data structures with a comfortable flexibility.
We will next see one of the main Data Grid products on the market: Hazelcast.
Hazelcast
It is an open source distributed storage system whose main foundation is to share different data structures in a distributed way, with flexible and convenient scalability. The data is distributed among the nodes in a balanced way, yet still being fault tolerant against the failure of nodes.
Architecture
- Deployment and configuration of the nodes to work with our data sources.
- Client with which we communicate and configure the nodes.
- Microservices: We deploy JET, it works in a similar way and allows us to embed modules in each of the microservices.
Deployments
Docker Cloud
Launch Hazelcast instances inside docker containers, independently or as a cluster. We can launch a client for your governance or the «Hazelcast Management center».
Docker & AWS / AzureD
Same operation as above, but deploying the containers on any cloud platform we may want.
Kubernetes & Docker Swarm
We can govern Hazelcast through Kubernetes and Docker Swarm. This is the recommended case for a use with Azure.
Uses
And what is the use of all this? Let’s look at some usage examples:
- Share data and work between multiple servers.
- Distributed data cache.
- Secure communication between servers.
- In-memory data partitioning.
- Parallel processing.
- Fail-safe data management.
- Launch complex queries against cached data.
- Load distribution.
- Real-time streamer for performance detection.
- Storage of session data in web application.
Hazelcast JET
It works dynamically and in real time with data streams, and it offers us the possibility of embedding each node in applications and microservices. Its use is recommended when we are faced with large volumes of data and the need for real time. It offers us a low latency engine and a high transfer rate.
Some features
- Low end-to-end latency
- Embedded Hazelcast IMDG.
- Easy to use: a single JAR, with no dependencies.
- Light and embeddable.
- Cloud deployment.
Jet Uses
- Recommended for use in microservices.
- Connection with DataBrokers.
- Simple integration and deployment.
- Support for big data and IoT.
Header image: Julius Drost at Unsplash