26 Eylül 2022 Pazartesi

In-Memory Data Grid - IMDG Nedir ?

In-Memory Data Grid - IMDG  Nedir
Açıklaması şöyle
What is an In-Memory Data Grid (IMDG)?
First of all, let’s introduce the concept of Data Grid. A Data Grid is a system of multiple servers that work together to manage information and related operations in a distributed environment.

The servers from the grid can be located in the same location or distributed across multiple data centers.
Bir başka açıklama şöyle
It is distributed cache with computational capabilities and additional data structures
Yani IMDG 
1. Cache olarak kullanılır
2. Computation için kullanılır

Partition Yani Sharding
Bir soru ve cevap şöyle. Yani Hazelcast ile veri 271 parçaya bölünüyor
Q : Why hazelcast has default partition count of 271 and what are the parameters to chose one?

A : 271 is a prime number. And given any key, Hazelcast will hash the key and mod it with the partition count. In this context, prime numbers are believed to generate more pseudo-random result. Actually for user perspective, it is not that important to have it prime.
IMDG Kullanım Senaryoları
Açıklaması şöyle
There are two major use-cases for an In-Memory Data Grid: 
1. Data Cache
2. Data Service Fabric
Data Service Fabric Nedir
Açıklaması şöyle
By using the IMDG as a Data Service Fabric we can perform near real-time integration between multiple components of a system.
In this way, we achieve a lot of computing power which can help us in designing a responsive distributed system, which is the core of the entire reactive systems idea.
Leveraging the IMDG can allow us to use it as a messaging platform, basically performing in-memory streaming.
Hazelcast İki Farklı Şekilde IMDG Olarak Kullanılabilir
1. Embedded In Memory Data Grid
2. Client-Server

1. Embedded Kullanım
Açıklaması şöyle
An In-Memory Data Grid is a grid that stores data entirely into Random Access Memory (RAM).
Bu çalışma şeklinde her Hazelcast katılımcısı aynı zamanda Hazelcast Cluster'ının da bir parçası. Bu yüzden verinin bir kısmı belleğimizde saklanıyor ve işlemci gücü harcıyoruz.
Yani 
- Her JVM içinde bir Hazelcast vardır. 
- Eğer Hibernate Second Level Cache olarak kullanmak istersek com.hazelcast.hibernate.HazelcastCacheRegionFactory kullanılır

2. Client-Server
Bu çalışma şeklinde Hazelcast sunucularına istemci olarak bağlanıyoruz.

Hazelcast Cluster Nedir
Açıklaması şöyle. Cluster'da master-slave ilişkisi yoktur.
Hazelcast provides no single point of failure for data systems. What does this mean and how does Hazelcast achieve this? Because of the fact that it uses peer to peer communication between its members, there is no master-slave relations between cluster members. All cluster members configured in same way so any member can be replaced with other. (The first node created in the cluster manages cluster members, then the second oldest takes the responsibility if first node is down.)
Cluster'lar şu topolojide olabilir
Single Cluster That Spans Across Datacenter(s)
Single Cluster Per Datacenter
Single Clusters Per Region
Hazelcast Cluster Discovery Nasıldır
Açıklaması şöyle
As we have already seen, when talking about an IMDG, a very important aspect is the Cluster Discovery mechanism. Hazelcast provides multiple methods that can be used:

TCP/IP multicast discovery which is not recommended in a production environment;
TCP/IP unicast discovery which implies managing a static list of addresses of some members of the cluster;
Various discovery plugins for cloud, like Eureka, Zookeeper, Kubernetes, Openshift, Pivotal Cloud Foundry, Google Cloud Platform, Amazon Web Services, Microsoft Azure;
Implement a custom discovery mechanism via Discovery Service Provider Interface (SPI).
Açıklaması şöyle
Hazelcast provides different means of auto-discovery cluster members. For instance, for local (development) environment, the multicast mechanism over UDP allows members to find each other. So, it is possible to run locally several instances of the application and Hazelcast will be able to build a cluster using a multicast auto-discovery. This type of discovery is enabled as following:


 Veri Yapıları Nelerdir
Açıklaması şöyleIMap yazısına bakabilirsiniz.
Besides all these, Hazelcast offers many distributed data structures such as standard utility collections : Map, Queue, Set, and List, Topic for pub/sub mechanisms. In addition to these, Concurrency utility data structures also is included in Hazelcast such as FencedLock, ISemaphore and so on. If already existed distributed data structures are not enough for your need, you can create your own distributed data structure by using Service Provider Interface which Hazelcast offers for users.


Hiç yorum yok:

Yorum Gönder

THIRD-PARTY.txt Dosyası

Kullanılan harici kütüphanelerin sürümleri bu dosyada Dosyanın yolu şöyle hazelcast/licenses/THIRD-PARTY.txt