SlideShare a Scribd company logo
1 of 41
Download to read offline
SUPERCOMPUTING
FOR THE REST OF US
IN-MEMORY DATA-GRIDS
*
RALPH WINZINGER, SENACOR TECHNOLOGIES
RALPH WINZINGER
WHO AM I?
• Senior Technical Leader @ Senacor Technologies
• evaluating new technologies
• panning of Senacor-internal academy
• hacker :-)
• Senacor Technologies, several offices in Germany
• partner for large IT transformations @ big brands
• finance, logistics, industry, insurance, government
• nature of applications is changing
• increased amount of connectivity and communication
• increased amount of data collected from sensors and apps
• expectations of customers are changing
• services have to be available at any time
• responses need to be delivered immediately
NEW CHALLENGES DUE TO DIGITIZATION
PHYSICAL MEETS DIGITAL
NEW CHALLENGES DUE TO DIGITIZATION
PHYSICAL MEETS DIGITAL
MORE DATA
MORE REQUESTS
HIGHER AVAILABILITY
HIGHER PERFORMANCE
?
Web 2.0
MASSIVE PARALLEL APPROACH
DOES IT SCALE?
2003
2004
2006
2007
2009
Google Distributed Filesystem
Google Map Reduce
Google Big Table
Amazon Dynamo
Facebook Cassandra
2000
2010
Web 2.0
MASSIVE PARALLEL APPROACH
DOES IT SCALE?
2003
2004
2006
2007
2009
Google Distributed Filesystem
Google Map Reduce
Google Big Table
Amazon Dynamo
Facebook Cassandra
scaling to
billions of requests per day
with
commodity hardware
- scaling out -
2000
2010
SCALE UP VS. SCALE OUT
DOES IT SCALE?
• scaling up is easy but surely expensive
• every piece of technology has upper limits
• scaling out is cheap but has certain drawbacks
• clustering is commodity for many years now,

but primary addresses logic, not data
• synchronization issues
EVOLUTION OF PERFORMANCE AND PRICING
CAPABILITIES & COSTS
NETWORKLATENCY
MEMORYCAPACITY
EVOLUTION OF PERFORMANCE AND PRICING
CAPABILITIES & COSTS
NETWORKLATENCY
MEMORYCAPACITY
Price
EVOLUTION OF PERFORMANCE AND PRICING
CAPABILITIES & COSTS
NETWORKLATENCY
MEMORYCAPACITY
Price
THIS IS THE BASE FOR
IN-MEMORY DATA GRIDS
IN-MEMORY DATA-GRIDS
JUST KEEP IT IN MIND
• IN-MEMORY DATA
• all data needed is supposed to be kept in memory
• HEAP / RAM is becoming a first class citizen
• GRID
• too big for one node, so data is distributed in cluster
• already a couple of players out there
• Hazelcast, Oracle, Terracotta, Infinispan, GridGain, …
IN-MEMORY DATA-GRIDS
JUST KEEP IT IN MIND
• IN-MEMORY DATA
• all data needed is supposed to be kept in memory
• HEAP / RAM is becoming a first class citizen
• GRID
• too big for one node, so data is distributed in cluster
• already a couple of players out there
• Hazelcast, Oracle, Terracotta, Infinispan, GridGain, …
MEMORY X1
NETWORK X100
DISK X1000
IN-MEMORY DATA-GRIDS
JUST KEEP IT IN MIND
• IN-MEMORY DATA
• all data needed is supposed to be kept in memory
• HEAP / RAM is becoming a first class citizen
• GRID
• too big for one node, so data is distributed in cluster
• already a couple of players out there
• Hazelcast, Oracle, Terracotta, Infinispan, GridGain, …
MEMORY X1
NETWORK X100
DISK X1000
EMBEDDED OR CLIENT/SERVER IMDG APPROACH
MAKI AND NIGIRI
• embedded IMDG
• every node-instance of an app is contributing

to overall memory
• client / server
• dedicated memory cluster, apart form application
EMBEDDED OR CLIENT/SERVER IMDG APPROACH
MAKI AND NIGIRI
NODE1 NODE3NODE2 NODE4
MEMORY MEMORY MEMORY MEMORY
APP APP APP APP
NODE1 NODE3NODE2 NODE4
APP APP APP APP
MEMORY MEMORY MEMORY MEMORYMEMORY MEMORYMEMORY
DISTRIBUTED DATA AND THE CAP THEOREM
… GO, CHOOSE TWO OF THEM!
or even better: „drop one of them“
Actually no choice - as long as we are
in a network
Use a quorum - if there are enough
nodes with the same data, that is the
truth. Might get expensive
Tolerate a „split brain“ and keep on
working. Might get hard to merge
P
C
A
C
PA
DISTRIBUTED DATA AND THE CAP THEOREM
… GO, CHOOSE TWO OF THEM!
or even better: „drop one of them“
Actually no choice - as long as we are
in a network
Use a quorum - if there are enough
nodes with the same data, that is the
truth. Might get expensive
Tolerate a „split brain“ and keep on
working. Might get hard to merge
P
C
A
C
PA
HIGH DENSITY DATA
HONEY, I SHRUNK THE DATA
• serialization has massive impact on
• performance - how fast can be de-/serialized?
• throughput - how big is data on the wire?
• volume - how much data can be put in memory?
• go & compare Java, XML, JSON, Protobuf, Capnproto, Thrift, …
• … and be suprised!
• hypercast = hazelcast +c24 preon
OFF-HEAP MEMORY
LEAVING THE SANDBOX
• IMDGs keep lots of data in memory - say hello to our friend, the
garbage collector!
• organizational overhead will be present if millions of objects are
stored on the heap
• tuning and deep understanding garbage collection is mandatory
• off-heap memory to the rescue
• data is not stored on the heap but in explicitly allocated areas
• IMDG is responsible for deallocating memory
OFF-HEAP MEMORY
LEAVING THE SANDBOX
• IMDGs keep lots of data in memory - say hello to our friend, the
garbage collector!
• organizational overhead will be present if millions of objects are
stored on the heap
• tuning and deep understanding garbage collection is mandatory
• off-heap memory to the rescue
• data is not stored on the heap but in explicitly allocated areas
• IMDG is responsible for deallocating memory
java.misc.Unsafe
OFF-HEAP MEMORY
LEAVING THE SANDBOX
• IMDGs keep lots of data in memory - say hello to our friend, the
garbage collector!
• organizational overhead will be present if millions of objects are
stored on the heap
• tuning and deep understanding garbage collection is mandatory
• off-heap memory to the rescue
• data is not stored on the heap but in explicitly allocated areas
• IMDG is responsible for deallocating memory
java.misc.Unsafe
DATA SHARDING & ELASTICITY
WHERE DID IT GO?
• scaling out with distributed data only makes sense when data is
partitioned - how to find the right partition?
• an IMDG is quite close to a HashMap - partitions are buckets
• partitionID = hashcode() % num_partions
• now think of a distributed HashMap - partitions are scattered over
our cluster
NODE 1
1
2
3
NODE 2
4
5
6
NODE 3
7
8
9
NODE N
P-2
P-1
P
…
DATA SHARDING & ELASTICITY
WHERE DID IT GO?
• scaling out with distributed data only makes sense when data is
partitioned - how to find the right partition?
• an IMDG is quite close to a HashMap - partitions are buckets
• partitionID = hashcode() % num_partions
• now think of a distributed HashMap - partitions are scattered over
our cluster
NODE 1
1
2
3
NODE 2
4
5
6
NODE 3
7
8
9
NODE N
P-5
P-4
P-3
NODE N+1
P-2
P-1
P
…
DATA SHARDING & ELASTICITY
WHERE DID IT GO?
• scaling out with distributed data only makes sense when data is
partitioned - how to find the right partition?
• an IMDG is quite close to a HashMap - partitions are buckets
• partitionID = hashcode() % num_partions
• now think of a distributed HashMap - partitions are scattered over
our cluster
NODE 1
1
2
3
NODE 2
4
5
6
NODE 3
7
8
9
NODE N
P-8
P-7
P-6
NODE N+1
P-5
P-4
P-3
EC3
P-2
P-1
P
…
ELDEST MEMBER VS. CENTRAL MANAGEMENT
HAVING A PARTY
• there is no central management instance in a (Hazelcast) IMDG
cluster, no single point of failure
• autodiscovery via network broadcast
• there is always one node which knows all other members - like the
first person on a party which gets introduced to all other guest
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
1 2
3
backup
partitions
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
1
2
3
backup
partitions
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
1 2
3
backup
partitions
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
1 2 3
backup
partitions
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
1 2
3
2 2
3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
1
2
3
2 2
3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
1 2
3
2 2
3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
1 23
2 2
3
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 31 2
31 2 3
1 23
2 23
FAILOVER
AND IF I PULLED THE PLUG???
• data is not only sharded but also redundant to recover from failing
nodes
NODE 1
1 2
3
NODE 2
1 2
3
NODE 3
1 2
3
NODE 4
1 2
3
backup
partitions
1 2 31 2 3
1 2 3
1’ 2’3’
1’ 2’
3’3 2 2
DISTRIBUTED COMPUTING IN AN IMDG
DIVIDE AND CONQUER
• reading data from the cluster and processing it is a straightforward
approach - but not always clever
• it might also be feasible to send algorithms to the cluster and
distribute processing
• MapReduce
• Hazelcast has built-in support for distributed executors
• think of it as serializable Runnables which can be sent and
executed on a different node
HAZELCAST FEATURES
NOW, WHAT’S INSIDE?
CODE DEMO
LET’S GET OUR HANDS DIRTY!
• not production grade!
• checkout on github
THANKS!
@rwinz
ralph.winzinger@senacor.com
https://github.com/rwinzinger

More Related Content

Viewers also liked

Hazelcast Deep Dive (Paris JUG-2)
Hazelcast Deep Dive (Paris JUG-2)Hazelcast Deep Dive (Paris JUG-2)
Hazelcast Deep Dive (Paris JUG-2)Emrah Kocaman
 
Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcastFuad Malikov
 
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayThink Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayRahul Gupta
 
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJoseph Kuo
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using HazelcastTaras Matyashovsky
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast EssentialsRahul Gupta
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
 
[OracleCode SF] In memory analytics with apache spark and hazelcast
[OracleCode SF] In memory analytics with apache spark and hazelcast[OracleCode SF] In memory analytics with apache spark and hazelcast
[OracleCode SF] In memory analytics with apache spark and hazelcastViktor Gamov
 

Viewers also liked (9)

Hazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGridHazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGrid
 
Hazelcast Deep Dive (Paris JUG-2)
Hazelcast Deep Dive (Paris JUG-2)Hazelcast Deep Dive (Paris JUG-2)
Hazelcast Deep Dive (Paris JUG-2)
 
Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcast
 
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayThink Distributed: The Hazelcast Way
Think Distributed: The Hazelcast Way
 
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using Hazelcast
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast Essentials
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
 
[OracleCode SF] In memory analytics with apache spark and hazelcast
[OracleCode SF] In memory analytics with apache spark and hazelcast[OracleCode SF] In memory analytics with apache spark and hazelcast
[OracleCode SF] In memory analytics with apache spark and hazelcast
 

Recently uploaded

Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 

In-Memory Datagrids (with examples of Hazelcast)

  • 1. SUPERCOMPUTING FOR THE REST OF US IN-MEMORY DATA-GRIDS * RALPH WINZINGER, SENACOR TECHNOLOGIES
  • 2. RALPH WINZINGER WHO AM I? • Senior Technical Leader @ Senacor Technologies • evaluating new technologies • panning of Senacor-internal academy • hacker :-) • Senacor Technologies, several offices in Germany • partner for large IT transformations @ big brands • finance, logistics, industry, insurance, government
  • 3. • nature of applications is changing • increased amount of connectivity and communication • increased amount of data collected from sensors and apps • expectations of customers are changing • services have to be available at any time • responses need to be delivered immediately NEW CHALLENGES DUE TO DIGITIZATION PHYSICAL MEETS DIGITAL
  • 4. NEW CHALLENGES DUE TO DIGITIZATION PHYSICAL MEETS DIGITAL MORE DATA MORE REQUESTS HIGHER AVAILABILITY HIGHER PERFORMANCE ?
  • 5. Web 2.0 MASSIVE PARALLEL APPROACH DOES IT SCALE? 2003 2004 2006 2007 2009 Google Distributed Filesystem Google Map Reduce Google Big Table Amazon Dynamo Facebook Cassandra 2000 2010
  • 6. Web 2.0 MASSIVE PARALLEL APPROACH DOES IT SCALE? 2003 2004 2006 2007 2009 Google Distributed Filesystem Google Map Reduce Google Big Table Amazon Dynamo Facebook Cassandra scaling to billions of requests per day with commodity hardware - scaling out - 2000 2010
  • 7. SCALE UP VS. SCALE OUT DOES IT SCALE? • scaling up is easy but surely expensive • every piece of technology has upper limits • scaling out is cheap but has certain drawbacks • clustering is commodity for many years now,
 but primary addresses logic, not data • synchronization issues
  • 8. EVOLUTION OF PERFORMANCE AND PRICING CAPABILITIES & COSTS NETWORKLATENCY MEMORYCAPACITY
  • 9. EVOLUTION OF PERFORMANCE AND PRICING CAPABILITIES & COSTS NETWORKLATENCY MEMORYCAPACITY Price
  • 10. EVOLUTION OF PERFORMANCE AND PRICING CAPABILITIES & COSTS NETWORKLATENCY MEMORYCAPACITY Price THIS IS THE BASE FOR IN-MEMORY DATA GRIDS
  • 11. IN-MEMORY DATA-GRIDS JUST KEEP IT IN MIND • IN-MEMORY DATA • all data needed is supposed to be kept in memory • HEAP / RAM is becoming a first class citizen • GRID • too big for one node, so data is distributed in cluster • already a couple of players out there • Hazelcast, Oracle, Terracotta, Infinispan, GridGain, …
  • 12. IN-MEMORY DATA-GRIDS JUST KEEP IT IN MIND • IN-MEMORY DATA • all data needed is supposed to be kept in memory • HEAP / RAM is becoming a first class citizen • GRID • too big for one node, so data is distributed in cluster • already a couple of players out there • Hazelcast, Oracle, Terracotta, Infinispan, GridGain, … MEMORY X1 NETWORK X100 DISK X1000
  • 13. IN-MEMORY DATA-GRIDS JUST KEEP IT IN MIND • IN-MEMORY DATA • all data needed is supposed to be kept in memory • HEAP / RAM is becoming a first class citizen • GRID • too big for one node, so data is distributed in cluster • already a couple of players out there • Hazelcast, Oracle, Terracotta, Infinispan, GridGain, … MEMORY X1 NETWORK X100 DISK X1000
  • 14. EMBEDDED OR CLIENT/SERVER IMDG APPROACH MAKI AND NIGIRI • embedded IMDG • every node-instance of an app is contributing
 to overall memory • client / server • dedicated memory cluster, apart form application
  • 15. EMBEDDED OR CLIENT/SERVER IMDG APPROACH MAKI AND NIGIRI NODE1 NODE3NODE2 NODE4 MEMORY MEMORY MEMORY MEMORY APP APP APP APP NODE1 NODE3NODE2 NODE4 APP APP APP APP MEMORY MEMORY MEMORY MEMORYMEMORY MEMORYMEMORY
  • 16. DISTRIBUTED DATA AND THE CAP THEOREM … GO, CHOOSE TWO OF THEM! or even better: „drop one of them“ Actually no choice - as long as we are in a network Use a quorum - if there are enough nodes with the same data, that is the truth. Might get expensive Tolerate a „split brain“ and keep on working. Might get hard to merge P C A C PA
  • 17. DISTRIBUTED DATA AND THE CAP THEOREM … GO, CHOOSE TWO OF THEM! or even better: „drop one of them“ Actually no choice - as long as we are in a network Use a quorum - if there are enough nodes with the same data, that is the truth. Might get expensive Tolerate a „split brain“ and keep on working. Might get hard to merge P C A C PA
  • 18. HIGH DENSITY DATA HONEY, I SHRUNK THE DATA • serialization has massive impact on • performance - how fast can be de-/serialized? • throughput - how big is data on the wire? • volume - how much data can be put in memory? • go & compare Java, XML, JSON, Protobuf, Capnproto, Thrift, … • … and be suprised! • hypercast = hazelcast +c24 preon
  • 19. OFF-HEAP MEMORY LEAVING THE SANDBOX • IMDGs keep lots of data in memory - say hello to our friend, the garbage collector! • organizational overhead will be present if millions of objects are stored on the heap • tuning and deep understanding garbage collection is mandatory • off-heap memory to the rescue • data is not stored on the heap but in explicitly allocated areas • IMDG is responsible for deallocating memory
  • 20. OFF-HEAP MEMORY LEAVING THE SANDBOX • IMDGs keep lots of data in memory - say hello to our friend, the garbage collector! • organizational overhead will be present if millions of objects are stored on the heap • tuning and deep understanding garbage collection is mandatory • off-heap memory to the rescue • data is not stored on the heap but in explicitly allocated areas • IMDG is responsible for deallocating memory java.misc.Unsafe
  • 21. OFF-HEAP MEMORY LEAVING THE SANDBOX • IMDGs keep lots of data in memory - say hello to our friend, the garbage collector! • organizational overhead will be present if millions of objects are stored on the heap • tuning and deep understanding garbage collection is mandatory • off-heap memory to the rescue • data is not stored on the heap but in explicitly allocated areas • IMDG is responsible for deallocating memory java.misc.Unsafe
  • 22. DATA SHARDING & ELASTICITY WHERE DID IT GO? • scaling out with distributed data only makes sense when data is partitioned - how to find the right partition? • an IMDG is quite close to a HashMap - partitions are buckets • partitionID = hashcode() % num_partions • now think of a distributed HashMap - partitions are scattered over our cluster NODE 1 1 2 3 NODE 2 4 5 6 NODE 3 7 8 9 NODE N P-2 P-1 P …
  • 23. DATA SHARDING & ELASTICITY WHERE DID IT GO? • scaling out with distributed data only makes sense when data is partitioned - how to find the right partition? • an IMDG is quite close to a HashMap - partitions are buckets • partitionID = hashcode() % num_partions • now think of a distributed HashMap - partitions are scattered over our cluster NODE 1 1 2 3 NODE 2 4 5 6 NODE 3 7 8 9 NODE N P-5 P-4 P-3 NODE N+1 P-2 P-1 P …
  • 24. DATA SHARDING & ELASTICITY WHERE DID IT GO? • scaling out with distributed data only makes sense when data is partitioned - how to find the right partition? • an IMDG is quite close to a HashMap - partitions are buckets • partitionID = hashcode() % num_partions • now think of a distributed HashMap - partitions are scattered over our cluster NODE 1 1 2 3 NODE 2 4 5 6 NODE 3 7 8 9 NODE N P-8 P-7 P-6 NODE N+1 P-5 P-4 P-3 EC3 P-2 P-1 P …
  • 25. ELDEST MEMBER VS. CENTRAL MANAGEMENT HAVING A PARTY • there is no central management instance in a (Hazelcast) IMDG cluster, no single point of failure • autodiscovery via network broadcast • there is always one node which knows all other members - like the first person on a party which gets introduced to all other guest
  • 26. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3
  • 27. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 1 2 3 backup partitions
  • 28. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 1 2 3 backup partitions
  • 29. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 1 2 3 backup partitions
  • 30. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 1 2 3 backup partitions
  • 31. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3
  • 32. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3 1 2 3 2 2 3
  • 33. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3 1 2 3 2 2 3
  • 34. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3 1 2 3 2 2 3
  • 35. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3 1 23 2 2 3
  • 36. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 31 2 31 2 3 1 23 2 23
  • 37. FAILOVER AND IF I PULLED THE PLUG??? • data is not only sharded but also redundant to recover from failing nodes NODE 1 1 2 3 NODE 2 1 2 3 NODE 3 1 2 3 NODE 4 1 2 3 backup partitions 1 2 31 2 3 1 2 3 1’ 2’3’ 1’ 2’ 3’3 2 2
  • 38. DISTRIBUTED COMPUTING IN AN IMDG DIVIDE AND CONQUER • reading data from the cluster and processing it is a straightforward approach - but not always clever • it might also be feasible to send algorithms to the cluster and distribute processing • MapReduce • Hazelcast has built-in support for distributed executors • think of it as serializable Runnables which can be sent and executed on a different node
  • 40. CODE DEMO LET’S GET OUR HANDS DIRTY! • not production grade! • checkout on github