SlideShare a Scribd company logo
The In-Memory Data Grid
Photo by Franki Chamaki on Unsplash
About me ...
- Passionate software engineer
- Focused mainly on JVM
- Interested in all software development phases
- Having erethic opinions
- Non politically correct, but just correct …
- Personal belief: “living in a distributed and reactive full of actors system”
Posting on:
Agenda
1. What is In-Memory Data Grid (IMDG) ?
2. Hazelcast IMDG
3. Cluster Discovery
4. Partitioning and Replication
5. Data Structure Overview
6. User-Code Deployment & Hazelcast-Spring
7. Demo time!
What is an In-Memory Data Grid (IMDG) ?
A Data Grid is a system of multiple servers that work together to manage
information and related operations in a distributed environment.
What is an In-Memory Data Grid (IMDG) ?
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.
What is an In-Memory Data Grid (IMDG) ?
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.
An In-Memory Data Grid is a grid that stores data entirely into RAM.
What is an In-Memory Data Grid (IMDG) ?
What is an In-Memory Data Grid (IMDG) ?
Why to use an In-Memory Data Grid?
Performance
● Access data 1000x faster
than a database
● Low latency for batch and
stream processing
Why to use an In-Memory Data Grid?
Performance Data structure/Handling
● Access data 1000x faster
than a database
● Low latency for batch and
stream processing
● Non-relational key-value
● ACID compliance
Why to use an In-Memory Data Grid?
Performance Data structure/Handling Operations
● Access data 1000x faster
than a database
● Low latency for batch and
stream processing
● Non-relational key-value
● ACID compliance
● Scalability
● Redundancy for HA
When to use an In-Memory Data Grid?
Data Cache
● Eliminates data store
bottlenecks
● Eliminates slow network
connections
● Long-running blocking
calculations
When to use an In-Memory Data Grid?
Data Cache Data Service Fabric
● Eliminates data store
bottlenecks
● Eliminates slow network
connections
● Long-running blocking
calculations
● Real-time integration
● Compute grid
● Message broker
When to use an In-Memory Data Grid?
Data Cache Data Service Fabric Examples
● Eliminates data store
bottlenecks
● Eliminates slow network
connections
● Long-running blocking
calculations
● Real-time integration
● Compute grid
● Message broker
● Analytics (Risk,
Fraud-detection)
● Trading Systems (FX
Trading, Stock Exchange)
● eCommerce
● Online Gaming
Basic operations of an In-Memory Data Grid
Cluster
● Distributed data
● Highly scalable
● Fault tolerance
Basic operations of an In-Memory Data Grid
Cluster Discovery
● Distributed data
● Highly scalable
● Fault tolerance
● Form
● Join
● Find
Basic operations of an In-Memory Data Grid
Cluster Discovery Data Distribution
● Distributed data
● Highly scalable
● Fault tolerance
● Form
● Join
● Find
● Replication/Mirroring
● Partitioning/Sharding
Replication and Partitioning
Replication - all the data is replicated (synchronously or asynchronously) to
every node in the cluster.
Replication and Partitioning
Replication - all the data is replicated (synchronously or asynchronously) to
every node in the cluster.
examples: a cluster of a relational database (MySQL, Oracle, etc.) leveraging
the master/leader-slave/follower model
Replication and Partitioning
Replication - all the data is replicated (synchronously or asynchronously) to
every node in the cluster.
examples: a cluster of a relational database (MySQL, Oracle, etc.) leveraging
the master/leader-slave/follower model
- Synchronous replication: writes need to be confirmed by a configurable
number of slaves/followers before the master/leader reports success (ACKs).
- Asynchronous replication: the master/leader reports success immediately
after a write was committed to its own disk/memory; followers apply the
changes in their own pace.
Replication and Partitioning
Partitioning/Sharding - is the most scalable distributed mode and relies on
keeping data in multiple disjoint distributed collections on different nodes,
leveraging 3 partitioning strategies: range, hash and custom partitioning.
Replication and Partitioning
Partitioning/Sharding - is the most scalable distributed mode and relies on keeping
data in multiple disjoint distributed collections on different nodes, leveraging 3
partitioning strategies: range, hash and custom partitioning.
examples: most NoSQL databases (Cassandra, MongoDB, etc.), Kafka uses
partitions
Replication and Partitioning
Partitioning/Sharding - is the most scalable distributed mode and relies on keeping data in multiple
disjoint distributed collections on different nodes, leveraging 3 partitioning strategies: range, hash and
custom partitioning.
examples: most NoSQL databases (Cassandra, MongoDB, etc.), Kafka uses partitions
- Range partitioning: takes into account the natural order of keys to split the dataset in the required
number of partitions; ex: MySQL partitions.
- Hash partitioning: calculates a hash over the each item key and then produces the modulo of this
hash to determine the new partition; ex: Cassandra consistent hashing algorithm.
- Custom partitioning: exploits locally or uniqueness properties of the data to calculate the
appropriate partition to store the data to; ex: pre-hashed data like git commits or location
specific data like all records from Europe
Replication vs Partitioning
Cons
Cons
Pros
Pros
Pros
Pros
Workload scalability
High availability
Failure recovery
Replication vs Partitioning
Replication Cons
Cons
Pros
Pros
Pros
Pros
Workload scalability
High availability
Failure recovery
Cons
Replication negative
performance impact
Data inconsistency
Memory scalability
issues
Replication vs Partitioning
Replication Cons
Cons
Pros
Pros
Pros
Pros
Workload scalability
High availability
Failure recovery
Cons
Replication negative
performance impact
Data inconsistency
Memory scalability
issues
Pros
Workload scalability
Failure recovery
Memory scalability
Good synchronization
performance
Replication vs Partitioning
Replication Cons
Cons
Pros
Pros
Pros
Pros
Workload scalability
High availability
Failure recovery
Cons
Replication negative
performance impact
Data inconsistency
Memory scalability
issues
Pros
Workload scalability
Failure recovery
Memory scalability
Good synchronization
performance
Cons
Migration negative
performance impact
Large memory
requirements
Deployment options
Embedded IMDG Client-Server
Hazelcast IMDG -
Characteristics
Why to choose Hazelcast IMDG?
Market Leader
● Hazelcast IMDG is
market leader
among In-Memory
Data Grid
solutions
Why to choose Hazelcast IMDG?
Market Leader Rich API
● Hazelcast IMDG is
market leader
among In-Memory
Data Grid
solutions
● APIs in various
programming
languages: Java,
C#.NET, Python,
etc.
● Powerful features
● Huge user base -
open source project
Why to choose Hazelcast IMDG?
Market Leader Rich API Ease of use
● Hazelcast IMDG is
market leader
among In-Memory
Data Grid
solutions
● APIs in various
programming
languages: Java,
C#.NET, Python,
etc.
● Powerful features
● Huge user base -
open source project
● Simple to use key-value
data store
● Standard data
structures: Map, List,
Queue, etc.
● Clients for many
programming
languages
● Redundancy/fail-over/sc
aling built-in
Why to choose Hazelcast IMDG?
Market Leader Rich API Ease of use Distributed data store
& computation system
● Hazelcast IMDG is
market leader
among In-Memory
Data Grid
solutions
● APIs in various
programming
languages: Java,
C#.NET, Python,
etc.
● Powerful features
● Huge user base -
open source project
● Simple to use key-value
data store
● Standard data
structures: Map, List,
Queue, etc.
● Clients for many
programming
languages
● Redundancy/fail-over/
scaling built-in
● Distributed data
store
● Distributed
computation near
stored data
Business scenario and HLA - overview
Business scenario:
● We will use Hazelcast IMDG for
developing a Foreign Exchange
Quotation Management System.
The system is consisting of:
● Two Spring Boot microservices:
market-client and trader-cli which are
basically Hazelcast clients and are
communicating with the grid via APIs.
● One Spring Boot microservice called
processing-unit which is basically a
Hazelcast server member that will join the
cluster when started.
Hazelcast features used
Deployment model:
● Client-Server
Cluster discovery mechanism:
● TCP/IP unicast discovery
Data structures used:
● Replicated Map
● Partitioned Map
Client-Server Deployment Model
Hazelcast Client Hazelcast Cluster Member
For creating a Hazelcast Client Java application we
must add the following dependencies:
● Prior to Hazelcast 4.x:
○ com.hazelcast:hazelcast:3.x
○ com.hazelcast:hazelcast-client:3.x
● For projects which are using Hazelcast 4.x:
○ com.hazelcast:hazelcast:4.x
For creating a Hazelcast Cluster Member Java
application we must add the following dependency:
○ com.hazelcast:hazelcast:${version}
Hazelcast Cluster Discovery
There are multiple ways to establish a discovery mechanism inside our Hazelcast
cluster:
● TCP/IP multicast
● TCP/IP unicast
● Discovery plugins or cloud: Eureka, ZooKeeper, K8s, OpenShift, Pivotal
Cloud Foundry (PCF), Google Cloud Platform (GCP), AWS, Azure
● Custom discovery mechanism via Discovery SPI
Hazelcast Cluster Discovery
In our cluster members we use TCP/IP unicast discovery.
In com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java:
Hazelcast Replicated Map
In the processing-unit Hazelcast Cluster Member Java application we are using
a replicated map data structure for storing the quote prices published by the
market-client.
The map must have a name, which in our case is “QUOTES_MAP” and is stored
in binary format in each cluster member instance.
Hazelcast Replicated Map
The necessary configuration for using a Replicated Map can be found in
com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java file.
Hazelcast Partitioned Map
In the processing-unit Hazelcast Cluster Member Java application we are using
a partitioned map data structure for storing all commands (Buy and Sell)
published by each trader (trader-cli microservice).
Hazelcast uses a hash partitioning for distributing the data across all cluster
members.
Hazelcast Partitioned Map
The necessary configuration for using a Partitioned Map can be found in
com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java file.
User code deployment
& Hazelcast-Spring
User code deployment
● Not enabled by default
● Allows us to load client classes inside cluster members
● There are necessary configurations that must be done in both
the client and the cluster member
User code deployment
Client configuration
User code deployment
Client configuration Cluster member configuration
Hazelcast-Spring
● com.hazelcast:hazelcast-spring:${version}
Hazelcast-Spring
● com.hazelcast:hazelcast-spring:${version}
● Dependency Inversion Principle
Hazelcast-Spring
● com.hazelcast:hazelcast-spring:${version}
● Dependency Inversion Principle
● @SpringAware
Hazelcast-Spring
● com.hazelcast:hazelcast-spring:${version}
● Dependency Inversion Principle
● @SpringAware
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
User-code deployment & Hazelcast-Spring
Demo Time!
Source code:
Hazelcast post on Medium!
Thank you !
● Don’t forget to follow me on @dinabogdan03
● Don’t forget to read my articles on @bogdan.dina03
● Join Bucharest Apache Kafka meetup group !!!

More Related Content

PPTX
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
PDF
The Future of Postgres Sharding / Bruce Momjian (PostgreSQL)
PPTX
NoSQL Consepts
PPTX
NoSQL databases - An introduction
PDF
Design Patterns for Distributed Non-Relational Databases
PPTX
Welcome: MariaDB today and our vision for the future
PDF
Engineering practices in big data storage and processing
PPTX
Cassandra an overview
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
The Future of Postgres Sharding / Bruce Momjian (PostgreSQL)
NoSQL Consepts
NoSQL databases - An introduction
Design Patterns for Distributed Non-Relational Databases
Welcome: MariaDB today and our vision for the future
Engineering practices in big data storage and processing
Cassandra an overview

What's hot (20)

PPTX
Navigating NoSQL in cloudy skies
PPT
SQL, NoSQL, BigData in Data Architecture
PPTX
Welcome | MariaDB today and our vision for the future
PPTX
NoSQL Data Architecture Patterns
PDF
Gcp data engineer
PDF
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
PPTX
Maximizing performance via tuning and optimization
PPTX
Chapter1: NoSQL: It’s about making intelligent choices
PDF
Develop Scalable Applications with DataStax Drivers (Alex Popescu, Bulat Shak...
PDF
Data Virtualization in the Cloud: Accelerating Data Virtualization Adoption
PDF
Comparison between mongo db and cassandra using ycsb
PDF
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
PPTX
Cassandra
PPTX
Horizon for Big Data
PPTX
سکوهای ابری و مدل های برنامه نویسی در ابر
PPTX
Building a Pluggable Analytics Stack with Cassandra (Jim Peregord, Element Co...
PPT
An Effective Approach to Migrate Cassandra Thrift to CQL (Yabin Meng, Pythian...
PDF
Netezza Deep Dives
PPTX
DataStax | Distributing the Enterprise, Safely (Thomas Valley) | Cassandra Su...
PPTX
DataStax | Adversarial Modeling: Graph, ML, and Analytics for Identity Fraud ...
Navigating NoSQL in cloudy skies
SQL, NoSQL, BigData in Data Architecture
Welcome | MariaDB today and our vision for the future
NoSQL Data Architecture Patterns
Gcp data engineer
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Maximizing performance via tuning and optimization
Chapter1: NoSQL: It’s about making intelligent choices
Develop Scalable Applications with DataStax Drivers (Alex Popescu, Bulat Shak...
Data Virtualization in the Cloud: Accelerating Data Virtualization Adoption
Comparison between mongo db and cassandra using ycsb
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
Cassandra
Horizon for Big Data
سکوهای ابری و مدل های برنامه نویسی در ابر
Building a Pluggable Analytics Stack with Cassandra (Jim Peregord, Element Co...
An Effective Approach to Migrate Cassandra Thrift to CQL (Yabin Meng, Pythian...
Netezza Deep Dives
DataStax | Distributing the Enterprise, Safely (Thomas Valley) | Cassandra Su...
DataStax | Adversarial Modeling: Graph, ML, and Analytics for Identity Fraud ...
Ad

Similar to Data has a better idea the in-memory data grid (20)

PDF
Development of concurrent services using In-Memory Data Grids
PPTX
In Memory Data Grids, Demystified!
PPTX
From cache to in-memory data grid. Introduction to Hazelcast.
PDF
In-Memory Data Grids: Explained...
PPTX
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
PPT
Big Data & NoSQL - EFS'11 (Pavlo Baron)
PPTX
Intro to Big Data and NoSQL
PDF
Highly available distributed databases, how they work, javier ramirez at teowaki
PDF
In-Memory Data Grids - Ampool (1)
PDF
Big Data Architecture Workshop - Vahid Amiri
PDF
Scaling Databases On The Cloud
PDF
Scaing databases on the cloud
PDF
Spring one2gx2010 spring-nonrelational_data
PDF
Basics of the Highly Available Distributed Databases - teowaki - javier ramir...
PDF
Everything you always wanted to know about highly available distributed datab...
PPTX
In memory grids IMDG
PDF
Cassandra background-and-architecture
PDF
The NoSQL Ecosystem
PDF
HPTS 2011: The NoSQL Ecosystem
Development of concurrent services using In-Memory Data Grids
In Memory Data Grids, Demystified!
From cache to in-memory data grid. Introduction to Hazelcast.
In-Memory Data Grids: Explained...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
Big Data & NoSQL - EFS'11 (Pavlo Baron)
Intro to Big Data and NoSQL
Highly available distributed databases, how they work, javier ramirez at teowaki
In-Memory Data Grids - Ampool (1)
Big Data Architecture Workshop - Vahid Amiri
Scaling Databases On The Cloud
Scaing databases on the cloud
Spring one2gx2010 spring-nonrelational_data
Basics of the Highly Available Distributed Databases - teowaki - javier ramir...
Everything you always wanted to know about highly available distributed datab...
In memory grids IMDG
Cassandra background-and-architecture
The NoSQL Ecosystem
HPTS 2011: The NoSQL Ecosystem
Ad

Recently uploaded (20)

PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
ai tools demonstartion for schools and inter college
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
AI in Product Development-omnex systems
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
medical staffing services at VALiNTRY
PDF
Nekopoi APK 2025 free lastest update
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Design an Analysis of Algorithms II-SECS-1021-03
ai tools demonstartion for schools and inter college
PTS Company Brochure 2025 (1).pdf.......
AI in Product Development-omnex systems
Odoo POS Development Services by CandidRoot Solutions
medical staffing services at VALiNTRY
Nekopoi APK 2025 free lastest update
Which alternative to Crystal Reports is best for small or large businesses.pdf
Operating system designcfffgfgggggggvggggggggg
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
CHAPTER 2 - PM Management and IT Context
VVF-Customer-Presentation2025-Ver1.9.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Essential Infomation Tech presentation.pptx
Transform Your Business with a Software ERP System
How Creative Agencies Leverage Project Management Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design

Data has a better idea the in-memory data grid

  • 1. The In-Memory Data Grid Photo by Franki Chamaki on Unsplash
  • 2. About me ... - Passionate software engineer - Focused mainly on JVM - Interested in all software development phases - Having erethic opinions - Non politically correct, but just correct … - Personal belief: “living in a distributed and reactive full of actors system” Posting on:
  • 3. Agenda 1. What is In-Memory Data Grid (IMDG) ? 2. Hazelcast IMDG 3. Cluster Discovery 4. Partitioning and Replication 5. Data Structure Overview 6. User-Code Deployment & Hazelcast-Spring 7. Demo time!
  • 4. What is an In-Memory Data Grid (IMDG) ? A Data Grid is a system of multiple servers that work together to manage information and related operations in a distributed environment.
  • 5. What is an In-Memory Data Grid (IMDG) ? 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.
  • 6. What is an In-Memory Data Grid (IMDG) ? 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. An In-Memory Data Grid is a grid that stores data entirely into RAM.
  • 7. What is an In-Memory Data Grid (IMDG) ?
  • 8. What is an In-Memory Data Grid (IMDG) ?
  • 9. Why to use an In-Memory Data Grid? Performance ● Access data 1000x faster than a database ● Low latency for batch and stream processing
  • 10. Why to use an In-Memory Data Grid? Performance Data structure/Handling ● Access data 1000x faster than a database ● Low latency for batch and stream processing ● Non-relational key-value ● ACID compliance
  • 11. Why to use an In-Memory Data Grid? Performance Data structure/Handling Operations ● Access data 1000x faster than a database ● Low latency for batch and stream processing ● Non-relational key-value ● ACID compliance ● Scalability ● Redundancy for HA
  • 12. When to use an In-Memory Data Grid? Data Cache ● Eliminates data store bottlenecks ● Eliminates slow network connections ● Long-running blocking calculations
  • 13. When to use an In-Memory Data Grid? Data Cache Data Service Fabric ● Eliminates data store bottlenecks ● Eliminates slow network connections ● Long-running blocking calculations ● Real-time integration ● Compute grid ● Message broker
  • 14. When to use an In-Memory Data Grid? Data Cache Data Service Fabric Examples ● Eliminates data store bottlenecks ● Eliminates slow network connections ● Long-running blocking calculations ● Real-time integration ● Compute grid ● Message broker ● Analytics (Risk, Fraud-detection) ● Trading Systems (FX Trading, Stock Exchange) ● eCommerce ● Online Gaming
  • 15. Basic operations of an In-Memory Data Grid Cluster ● Distributed data ● Highly scalable ● Fault tolerance
  • 16. Basic operations of an In-Memory Data Grid Cluster Discovery ● Distributed data ● Highly scalable ● Fault tolerance ● Form ● Join ● Find
  • 17. Basic operations of an In-Memory Data Grid Cluster Discovery Data Distribution ● Distributed data ● Highly scalable ● Fault tolerance ● Form ● Join ● Find ● Replication/Mirroring ● Partitioning/Sharding
  • 18. Replication and Partitioning Replication - all the data is replicated (synchronously or asynchronously) to every node in the cluster.
  • 19. Replication and Partitioning Replication - all the data is replicated (synchronously or asynchronously) to every node in the cluster. examples: a cluster of a relational database (MySQL, Oracle, etc.) leveraging the master/leader-slave/follower model
  • 20. Replication and Partitioning Replication - all the data is replicated (synchronously or asynchronously) to every node in the cluster. examples: a cluster of a relational database (MySQL, Oracle, etc.) leveraging the master/leader-slave/follower model - Synchronous replication: writes need to be confirmed by a configurable number of slaves/followers before the master/leader reports success (ACKs). - Asynchronous replication: the master/leader reports success immediately after a write was committed to its own disk/memory; followers apply the changes in their own pace.
  • 21. Replication and Partitioning Partitioning/Sharding - is the most scalable distributed mode and relies on keeping data in multiple disjoint distributed collections on different nodes, leveraging 3 partitioning strategies: range, hash and custom partitioning.
  • 22. Replication and Partitioning Partitioning/Sharding - is the most scalable distributed mode and relies on keeping data in multiple disjoint distributed collections on different nodes, leveraging 3 partitioning strategies: range, hash and custom partitioning. examples: most NoSQL databases (Cassandra, MongoDB, etc.), Kafka uses partitions
  • 23. Replication and Partitioning Partitioning/Sharding - is the most scalable distributed mode and relies on keeping data in multiple disjoint distributed collections on different nodes, leveraging 3 partitioning strategies: range, hash and custom partitioning. examples: most NoSQL databases (Cassandra, MongoDB, etc.), Kafka uses partitions - Range partitioning: takes into account the natural order of keys to split the dataset in the required number of partitions; ex: MySQL partitions. - Hash partitioning: calculates a hash over the each item key and then produces the modulo of this hash to determine the new partition; ex: Cassandra consistent hashing algorithm. - Custom partitioning: exploits locally or uniqueness properties of the data to calculate the appropriate partition to store the data to; ex: pre-hashed data like git commits or location specific data like all records from Europe
  • 24. Replication vs Partitioning Cons Cons Pros Pros Pros Pros Workload scalability High availability Failure recovery
  • 25. Replication vs Partitioning Replication Cons Cons Pros Pros Pros Pros Workload scalability High availability Failure recovery Cons Replication negative performance impact Data inconsistency Memory scalability issues
  • 26. Replication vs Partitioning Replication Cons Cons Pros Pros Pros Pros Workload scalability High availability Failure recovery Cons Replication negative performance impact Data inconsistency Memory scalability issues Pros Workload scalability Failure recovery Memory scalability Good synchronization performance
  • 27. Replication vs Partitioning Replication Cons Cons Pros Pros Pros Pros Workload scalability High availability Failure recovery Cons Replication negative performance impact Data inconsistency Memory scalability issues Pros Workload scalability Failure recovery Memory scalability Good synchronization performance Cons Migration negative performance impact Large memory requirements
  • 30. Why to choose Hazelcast IMDG? Market Leader ● Hazelcast IMDG is market leader among In-Memory Data Grid solutions
  • 31. Why to choose Hazelcast IMDG? Market Leader Rich API ● Hazelcast IMDG is market leader among In-Memory Data Grid solutions ● APIs in various programming languages: Java, C#.NET, Python, etc. ● Powerful features ● Huge user base - open source project
  • 32. Why to choose Hazelcast IMDG? Market Leader Rich API Ease of use ● Hazelcast IMDG is market leader among In-Memory Data Grid solutions ● APIs in various programming languages: Java, C#.NET, Python, etc. ● Powerful features ● Huge user base - open source project ● Simple to use key-value data store ● Standard data structures: Map, List, Queue, etc. ● Clients for many programming languages ● Redundancy/fail-over/sc aling built-in
  • 33. Why to choose Hazelcast IMDG? Market Leader Rich API Ease of use Distributed data store & computation system ● Hazelcast IMDG is market leader among In-Memory Data Grid solutions ● APIs in various programming languages: Java, C#.NET, Python, etc. ● Powerful features ● Huge user base - open source project ● Simple to use key-value data store ● Standard data structures: Map, List, Queue, etc. ● Clients for many programming languages ● Redundancy/fail-over/ scaling built-in ● Distributed data store ● Distributed computation near stored data
  • 34. Business scenario and HLA - overview Business scenario: ● We will use Hazelcast IMDG for developing a Foreign Exchange Quotation Management System. The system is consisting of: ● Two Spring Boot microservices: market-client and trader-cli which are basically Hazelcast clients and are communicating with the grid via APIs. ● One Spring Boot microservice called processing-unit which is basically a Hazelcast server member that will join the cluster when started.
  • 35. Hazelcast features used Deployment model: ● Client-Server Cluster discovery mechanism: ● TCP/IP unicast discovery Data structures used: ● Replicated Map ● Partitioned Map
  • 36. Client-Server Deployment Model Hazelcast Client Hazelcast Cluster Member For creating a Hazelcast Client Java application we must add the following dependencies: ● Prior to Hazelcast 4.x: ○ com.hazelcast:hazelcast:3.x ○ com.hazelcast:hazelcast-client:3.x ● For projects which are using Hazelcast 4.x: ○ com.hazelcast:hazelcast:4.x For creating a Hazelcast Cluster Member Java application we must add the following dependency: ○ com.hazelcast:hazelcast:${version}
  • 37. Hazelcast Cluster Discovery There are multiple ways to establish a discovery mechanism inside our Hazelcast cluster: ● TCP/IP multicast ● TCP/IP unicast ● Discovery plugins or cloud: Eureka, ZooKeeper, K8s, OpenShift, Pivotal Cloud Foundry (PCF), Google Cloud Platform (GCP), AWS, Azure ● Custom discovery mechanism via Discovery SPI
  • 38. Hazelcast Cluster Discovery In our cluster members we use TCP/IP unicast discovery. In com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java:
  • 39. Hazelcast Replicated Map In the processing-unit Hazelcast Cluster Member Java application we are using a replicated map data structure for storing the quote prices published by the market-client. The map must have a name, which in our case is “QUOTES_MAP” and is stored in binary format in each cluster member instance.
  • 40. Hazelcast Replicated Map The necessary configuration for using a Replicated Map can be found in com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java file.
  • 41. Hazelcast Partitioned Map In the processing-unit Hazelcast Cluster Member Java application we are using a partitioned map data structure for storing all commands (Buy and Sell) published by each trader (trader-cli microservice). Hazelcast uses a hash partitioning for distributing the data across all cluster members.
  • 42. Hazelcast Partitioned Map The necessary configuration for using a Partitioned Map can be found in com.freesoft.fx.trading.processingunit.infrastructure.imdg.HazelcastConfiguration.java file.
  • 43. User code deployment & Hazelcast-Spring
  • 44. User code deployment ● Not enabled by default ● Allows us to load client classes inside cluster members ● There are necessary configurations that must be done in both the client and the cluster member
  • 46. User code deployment Client configuration Cluster member configuration
  • 51. User-code deployment & Hazelcast-Spring
  • 52. User-code deployment & Hazelcast-Spring
  • 53. User-code deployment & Hazelcast-Spring
  • 54. User-code deployment & Hazelcast-Spring
  • 55. User-code deployment & Hazelcast-Spring
  • 56. User-code deployment & Hazelcast-Spring
  • 57. User-code deployment & Hazelcast-Spring
  • 58. User-code deployment & Hazelcast-Spring
  • 61. Hazelcast post on Medium!
  • 62. Thank you ! ● Don’t forget to follow me on @dinabogdan03 ● Don’t forget to read my articles on @bogdan.dina03 ● Join Bucharest Apache Kafka meetup group !!!