SlideShare a Scribd company logo
1 of 101
Download to read offline
ROME 27-28 march 2015 – Ugo Landini
Quick Start Lab
JBoss Data Grid
Ugo Landini

Senior Solution Architect

ugol@redhat.com

March 26th 2015
Quick Start Lab - JBoss Data Grid2
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid3
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid4
new generation of
technologies ... designed to
economically extract value
from very large volumes of a
wide variety of data, by
enabling high velocity
capture, discovery and/or
analysis
IDC, 2012
Big Data
Quick Start Lab - JBoss Data Grid5
Not Only SQL
Just an alternative to
RDBMS
NoSQL
Quick Start Lab - JBoss Data Grid6
K/V Store
Document Store
Column based DB
Graph DB
XML, Object DB, Multidimensional, Grid/Cloud, …
see map on https://451research.com/images/Marketing/dataplatformsmapoctober2014.pdf
NoSQL
Quick Start Lab - JBoss Data Grid7
NoSQL
Quick Start Lab - JBoss Data Grid8
We’re here
NoSQL
Quick Start Lab - JBoss Data Grid9
•Very hard to categorise in a systematic way
•Many nuances
•Many cases of “Evolutionary Convergence”
•i.e. evolving similar features having to adapt to similar
environments
NoSQL
Quick Start Lab - JBoss Data Grid10
CAP Theorem
Quick Start Lab - JBoss Data Grid11
•Brewer’sTheorem (2000, proven in 2002)
•Three guarantees of a Distributed System
•Consistency
•Availability
•PartitionTolerance
CAP Theorem
Quick Start Lab - JBoss Data Grid12
All nodes see the same data at the same time
Consistency
Quick Start Lab - JBoss Data Grid13
A guarantee that every request receives a response
about whether it succeeded or failed
Availability
Quick Start Lab - JBoss Data Grid14
The system continues to operate despite arbitrary
message loss or failure of part of the system
Partition Tolerance
Quick Start Lab - JBoss Data Grid15
The system continues to operate despite arbitrary
message loss or failure of part of the system
Partition Tolerance
Quick Start Lab - JBoss Data Grid16
Consistency:
Transactions
Availability:
Redundancy
Partition
Tolerance:
Scaleout
CAP: Popular Version
Quick Start Lab - JBoss Data Grid17
Consistency:
Transactions
Availability:
Redundancy
Partition
Tolerance:
Scaleout
NO
GO
CAP: Popular Version
Quick Start Lab - JBoss Data Grid18
Consistency:
Transactions
Availability:
Redundancy
Partition
Tolerance:
Scaleout
RDBMS
CAP: Popular Version
Quick Start Lab - JBoss Data Grid19
Consistency:
Transactions
Availability:
Redundancy
Partition
Tolerance:
Scaleout
NoSQL
CAP: Popular Version
Quick Start Lab - JBoss Data Grid20
Brewer wrote an essay in 2012 to clarify some of the
CAP implications
http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
CAP: Modern Version
Quick Start Lab - JBoss Data Grid21
The "two out of three" concept can be misleading or
misapplied and it should be considered as a tautology
Many vendors used CAP theorem just as an excuse to
sacrifice Consistency
CAP: Modern Version
Quick Start Lab - JBoss Data Grid22
Partitions are rare, so there is little reason to forfeit C or
A when the system is not partitioned
The choice between C and A can occur many times
within the same system at very fine granularity
CAP: Modern Version
Quick Start Lab - JBoss Data Grid23
Different decisions about C and A:
•for different operations
•for different data
•in different moments
CAP: Modern Version
Quick Start Lab - JBoss Data Grid24
Finally, C, A e P are more continuos than binary:
•A is obviously continuous
•Many levels of Consistency (think isolation level in
classic DB)
•Even Partitions have nuances, including disagreement
within the system about whether a partition exists
CAP: Modern Version
Quick Start Lab - JBoss Data Grid25
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
26
Virtual Machine 1
Client
Cache
RDBMS
read & write
Local Caching
27
Virtual Machine 1
Client
Cache
RDBMS
read & write
•Single JVM
•few memory
•no HA
Local Caching
28
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
1. Client 1 reads A
First try at distributed caching
29
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
2. Client 1 writes A
to Cache 1
First try at distributed caching
30
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
3. Client 2 writes A2
to RDBMS
First try at distributed caching
31
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
4. Client 1 reads A
from Cache 1
First try at distributed caching
32
Distributed Caching on many nodes
What about dirty reads? (i.e. how to cope with multiple
writes, invalidation, etc.)
First try at distributed caching
33
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
1. Client 2 writes A2
to RDBMS
Second try at distributed caching
34
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
2. Client 2 updates
Cache 2
Second try at distributed caching
35
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
3. sync Caches
Second try at distributed caching
36
Virtual Machine 1
Client 1
Cache 1
RDBMS
Virtual Machine 2
Client 2
Cache 2
1. Client 1 reads A2
from Cache 1
Second try at distributed caching
Quick Start Lab - JBoss Data Grid37
New Cache topology
Startup time
State transfers
Incompatible JVM tunings
GCs
Non Java clients
Second try at distributed caching
Quick Start Lab - JBoss Data Grid38
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid39
Hashing Wheel: a mathematical “wheel” on which you
hash Ks (keys) and Ns (nodes).
The relative position of Ks and Ns determines which
Node is the “owner” of that particular K in a topology
Consistent Hashing
Quick Start Lab - JBoss Data Grid40
N1 Node 1
N2
N3
Node 2
Node 3
Consistent Hashing
Quick Start Lab - JBoss Data Grid41
Ns (nodes) on the “wheel” partition the hash space in
segments
Every segment contains a range of Ks
Consistent Hashing
Quick Start Lab - JBoss Data Grid42
N1 Node 1
N2
N3
Node 2
Node 3
K250
Consistent Hashing
Quick Start Lab - JBoss Data Grid43
N1 Node 1
N2
N3
Node 2
Node 3
K250
owner = N2
Consistent Hashing
Quick Start Lab - JBoss Data Grid44
N1 Node 1
N2
N3
Node 2
Node 3
K250
K570
K700
K900
K53
Consistent Hashing
Quick Start Lab - JBoss Data Grid45
Going clockwise from the K:
•the first N is the owner
•next N is the replica
•next next N could be another replica, and so on
Consistent Hashing
Quick Start Lab - JBoss Data Grid46
N1 Node 1
N2
N3
Node 2
Node 3
K250
K570
K700
K900
K53
owner = N2
replica = N3
Consistent Hashing
Quick Start Lab - JBoss Data Grid47
What happens if a node dies?
Consistent Hashing
Quick Start Lab - JBoss Data Grid48
N1 Node 1
N3
Node 2
Node 3
K250
K570
K700
K900
K53
owner = N2
replica = N3
Consistent Hashing
Quick Start Lab - JBoss Data Grid49
N1 Node 1
N3Node 3
K250
K570
K700
K900
K53
Consistent Hashing
Quick Start Lab - JBoss Data Grid50
N1 Node 1
N3Node 3
K250
K570
K700
K900
K53
owner = N3
replica = N1
Consistent Hashing
Quick Start Lab - JBoss Data Grid51
The real CH algorithm implemented in JDG is slightly
different
CH is optimized to minimize state transfer (i.e. number
of keys moving when a node dies or a new one joins the
cluster)
Consistent Hashing
Quick Start Lab - JBoss Data Grid52
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid53
Distributed Memory Storage Engine
Networked Memory
A Distributed Cache “on steroids”
ATransactional NoSQL
What’s a Data Grid?
Quick Start Lab - JBoss Data Grid54
•Key/Value storage
•Search Engine (from K/V to Document storage)
•Linear Scalability, Elasticity and Fault tolerance
•Thanks to CH
•Memory based
•Persistence engines are optional
What’s a Data Grid?
Quick Start Lab - JBoss Data Grid55
•DifferentTopologies
•Querying
•Task Execution & Map/Reduce
•Partition Handling
•Data Affinity (to squeeze every bit of
performance)
Data Grid > Distributed Caching
Quick Start Lab - JBoss Data Grid56
•LOCAL
•INVALIDATION
•REPLICATED
•DISTRIBUTED
JDG Cache Topologies (Cluster modes)
Quick Start Lab - JBoss Data Grid57
•LOCAL
•simple cache (EHCache-like)
•INVALIDATION
•REPLICATED
•DISTRIBUTED
JDG Cache Topologies (Cluster modes)
Quick Start Lab - JBoss Data Grid58
•LOCAL
•INVALIDATION
•no sharing
•REPLICATED
•DISTRIBUTED
JDG Cache Topologies (Cluster modes)
Quick Start Lab - JBoss Data Grid59
•LOCAL
•INVALIDATION
•REPLICATED
•All node are equals
•4 Nodes @ 8 GB = 8 GB
•DISTRIBUTED
JDG Cache Topologies (Cluster modes)
Quick Start Lab - JBoss Data Grid60
•LOCAL
•INVALIDATION
•REPLICATED
•DISTRIBUTED
•For example: 1 Replica
•4 Nodes @ 8 GB = 16 GB
JDG Cache Topologies (Cluster modes)
61
Server B
JDG 3 JDG 4
Server A
JDG 1 JDG 2 cluster
4 JDG Nodes on 2 servers
A Simple Grid
62
JDG 1 JDG 2 JDG 3 JDG 4
K0
K1
K6
K3
K8
K2
K4
K9
K5
K7
Distributed without Replica
63
JDG 1 JDG 2 JDG 3 JDG 4
K0
K1
K6
K3
K8
K2
K4
K9
K5
K7
K5
K2 K9
K7
K4
K3
K1
K0
K8
K6
Distributed with Replica
64
JDG 1 JDG 2 JDG 3 JDG 4
K0K1
K6
K3
K8
K2
K4
K9K5
K7
K0K1
K6
K3
K8
K2
K4
K9K5
K7
K0K1
K6
K3
K8
K2
K4
K9K5
K7
K0K1
K6
K3
K8
K2
K4
K9K5
K7
Replicated
Quick Start Lab - JBoss Data Grid65
•Replicated:
•“Small” set of data with high % of reads vs
writes
•Distributed:
•“Big” set of data: linear scaling
•You need M/R & Distexec
How do I choose?
Quick Start Lab - JBoss Data Grid66
•You can have different Cache configurations
in the same CacheManager
•mix&match Replicated and Distributed as
needed
JDG Cache Topologies (Cluster modes)
Quick Start Lab - JBoss Data Grid67
•Default hashing (Distributed mode):
MurmurHash3.
•It’s a simple and standard Hashing:
•you can change it as you like, f.e. if your
key already identifies a partitioning criteria
Tuning your hashing
Quick Start Lab - JBoss Data Grid68
•Can be “fine tuned” in 4 different ways:
•Server Hinting
•Virtual Servers
•Grouping
•Key Affinity
Tuning your hashing
Quick Start Lab - JBoss Data Grid69
•A triple (site, rack, server)
•You increase availability avoiding that replicas
ends up in the same (site, rack, server) of the
master
Server Hinting
Quick Start Lab - JBoss Data Grid70
•Number of di “segments” in which the
cluster is partitioned
•Improve the node distribution on the
hashing wheel to have a better distribution
of keys
•Default: 60
Virtual Servers
Quick Start Lab - JBoss Data Grid71
•Data colocation
•A cache node contains K but also other
relevant data afferent to K
•Example: customer and its bank
movements
•You just have to define a group, JDG will
colocate all data of the same group in the
same node
Grouping
Quick Start Lab - JBoss Data Grid72
•Like Grouping, but from another perspective:
•You just ask a node for a key that will be
hashed on that node
•Grouping/Affinity are your best friends if you
want to reach JDG Nirvana!
Key Affinity
Quick Start Lab - JBoss Data Grid73
•All data needed by a node of your application are local,
at the distance of a single Java method call
JDG Nirvana
Quick Start Lab - JBoss Data Grid74
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid75
•Small self-contained projects that can be used to
simply explain JDG to customers
•https://github.com/redhat-italy/jdg-quickstarts
JDG Quickstarts
Quick Start Lab - JBoss Data Grid76
• Big Data & NoSQL: super quick introduction to terminology
• What developers do to scale out
• Consistent Hashing
• What’s a Data Grid
• DEMO
• Infinispan/JDG features
• Q&A
Agenda
Quick Start Lab - JBoss Data Grid77
•If JDG detects a split brain, partitions enter
in degraded mode
•A degraded partition can read/write ONLY
fully owned keys
•A partition fully owns a key if contains
master and replicas nodes for that key
•You’ll get an AvailabilityException for other
keys
Partition Handling
Quick Start Lab - JBoss Data Grid78
•Cache Store
•Not only in memory!
•Write through & write behind (ACK sync or
async)
•Pluggable “drivers”
•File System, JPA, LevelDB (supported)
•MongoDB, Cassandra, BerkeleyDB, etc.
(community)
Persistence
Quick Start Lab - JBoss Data Grid79
•To avoid Out Of Memory
•Entry can be “passivated” on disk (you’ll need a
CacheStore)
Eviction
Quick Start Lab - JBoss Data Grid80
•To avoid Out Of Memory
•Entry can be “passivated” on disk (you’ll need a
CacheStore)
Eviction
Quick Start Lab - JBoss Data Grid81
•You assign a lifespan or a max idle time to a
key
•The key will then be automatically removed
after that time
•You don’t need to write “Garbage Clean
code”
Expiry
Quick Start Lab - JBoss Data Grid82
Expiry
Quick Start Lab - JBoss Data Grid83
•Both avoid Out Of Memory
•“Evicted” data can be maintained in the Grid
with Passivation
•Eviction is a Cache configuration
•Expiration is a Key configuration
•Expiration could be a business requisite
•Eviction is a system feature
Eviction/Expiry: differences
Quick Start Lab - JBoss Data Grid84
•JDG has full support for transactions
•LocalTransactions
•GlobalTransactions (XA): if running inside an
AS automatically uses itsTX Manager
•Batching API
Transactions
Quick Start Lab - JBoss Data Grid85
•Cache/CacheManager events
•Topology changes
•Entries being added, removed, modified
•Cluster listeners
Listener/Notifications
Quick Start Lab - JBoss Data Grid86
•Infinispan-query module
•Hibernate Search & Lucene
•Querying via DSL
•Lucene indexes can be kept in memory, on
disk or in the grid
Querying the grid
Quick Start Lab - JBoss Data Grid87
•with M/R you can implement distributed global
operation on the grid
•Each node works on its data (Map)
•Results are later aggregated (Reduce)
Map/Reduce
Quick Start Lab - JBoss Data Grid88
Map/Reduce
Quick Start Lab - JBoss Data Grid89
Map/Reduce
Quick Start Lab - JBoss Data Grid90
•JDG 7 will implement HDFS API
•So it will be able to act as a super fast Hadoop
store
Hadoop, coming soon…
Quick Start Lab - JBoss Data Grid91
•With Distexec you can submit “tasks” to the
Grid
•The task can be executed on each node or
on a subset of the nodes
•The task can modify data in the Grid
Distributed Execution (Distexec)
Quick Start Lab - JBoss Data Grid92
Cross Site Replication
Quick Start Lab - JBoss Data Grid93
•“Follow the Sun” architectures
•Many different clusters that can be kept in
sync
Cross Site Replication
Quick Start Lab - JBoss Data Grid94
•JSR-107
•JavaTemporary Caching API
•Confirmed in January 2015
•In roadmap for JDG 6.5
•JSR-347
•Data Grids for the Java Platform
•JSR Retired in January 2015
Standard APIs
Quick Start Lab - JBoss Data Grid95
•Command Line Console
•JMX
•JON Plugin
Management Tooling
Quick Start Lab - JBoss Data Grid96
•User Authentication
•SASL
•Role Based Access Control (RBAC)
•Users, Roles and mapping between roles and
operations on Cache / Cache-Manager
•Node Authentication & Authorisation
•Encrypted communication between nodes
Data Security
Quick Start Lab - JBoss Data Grid97
•Library mode
•Embedded in your JVM
•C/S mode
•REST
•Memcached
•Hot Rod
Embedded vs Client/Server
Quick Start Lab - JBoss Data Grid98
Embedded vs Client/Server
Quick Start Lab - JBoss Data Grid99
Protocol
Client
Libs
Smart
Routing
Load
Balancing/
Failover
TX Listeners M/R Dist Querying
Separated
Cluster
Library
mode
inVM N/A Yes Dynamic Yes Yes Yes Yes Yes No
REST Text HTTP No
Any HTTP
load
balancer
No No No No No Yes
Memcached Text Many No
Predefined
server list
No No No No No Yes
Hot Rod Binary
Java/
Python/
C++
Yes Dynamic
Local w
MVCC
Yes (6.4) No No Yes (6.3) Yes
Protocol Comparison
ROME 27-28 march 2015 – Ugo Landini
Q&A
ROME 27-28 march 2015 – Ugo Landini
Thank You!
Leave your feedback on Joind.in!
https://joind.in/event/view/3347
Quick Start Lab
JBoss Data Grid
Ugo Landini

Senior Solution Architect

ugol@redhat.com

March 26th 2015

More Related Content

What's hot

NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database OverviewSteve Min
 
Couchbase Performance Benchmarking
Couchbase Performance BenchmarkingCouchbase Performance Benchmarking
Couchbase Performance BenchmarkingRenat Khasanshyn
 
Overview of some popular distributed databases
Overview of some popular distributed databasesOverview of some popular distributed databases
Overview of some popular distributed databasessagar chaturvedi
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera ClusterAbdul Manaf
 
Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011Henrik Ingo
 
Future of cloud storage
Future of cloud storageFuture of cloud storage
Future of cloud storageGlusterFS
 
Storing and processing data with the wso2 platform
Storing and processing data with the wso2 platformStoring and processing data with the wso2 platform
Storing and processing data with the wso2 platformWSO2
 
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...slashn
 
Introduction to GlusterFS Webinar - September 2011
Introduction to GlusterFS Webinar - September 2011Introduction to GlusterFS Webinar - September 2011
Introduction to GlusterFS Webinar - September 2011GlusterFS
 
Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedGear6
 
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQLsunnygleason
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityPythian
 
Open vStorage Road show 2015 Q1
Open vStorage Road show 2015 Q1Open vStorage Road show 2015 Q1
Open vStorage Road show 2015 Q1wim_provoost
 
Turning object storage into vm storage
Turning object storage into vm storageTurning object storage into vm storage
Turning object storage into vm storagewim_provoost
 
Chicago Data Summit: Geo-based Content Processing Using HBase
Chicago Data Summit: Geo-based Content Processing Using HBaseChicago Data Summit: Geo-based Content Processing Using HBase
Chicago Data Summit: Geo-based Content Processing Using HBaseCloudera, Inc.
 
Road show 2015 triangle meetup
Road show 2015 triangle meetupRoad show 2015 triangle meetup
Road show 2015 triangle meetupwim_provoost
 
Open vStorage Meetup - Santa Clara 04/16
Open vStorage Meetup -  Santa Clara 04/16Open vStorage Meetup -  Santa Clara 04/16
Open vStorage Meetup - Santa Clara 04/16wim_provoost
 

What's hot (20)

NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database Overview
 
Couchbase Performance Benchmarking
Couchbase Performance BenchmarkingCouchbase Performance Benchmarking
Couchbase Performance Benchmarking
 
Overview of some popular distributed databases
Overview of some popular distributed databasesOverview of some popular distributed databases
Overview of some popular distributed databases
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011
 
Future of cloud storage
Future of cloud storageFuture of cloud storage
Future of cloud storage
 
Storing and processing data with the wso2 platform
Storing and processing data with the wso2 platformStoring and processing data with the wso2 platform
Storing and processing data with the wso2 platform
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDB
 
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
 
Introduction to GlusterFS Webinar - September 2011
Introduction to GlusterFS Webinar - September 2011Introduction to GlusterFS Webinar - September 2011
Introduction to GlusterFS Webinar - September 2011
 
Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with Memcached
 
Methods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarkingMethods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarking
 
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQL
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
Open vStorage Road show 2015 Q1
Open vStorage Road show 2015 Q1Open vStorage Road show 2015 Q1
Open vStorage Road show 2015 Q1
 
Turning object storage into vm storage
Turning object storage into vm storageTurning object storage into vm storage
Turning object storage into vm storage
 
Chicago Data Summit: Geo-based Content Processing Using HBase
Chicago Data Summit: Geo-based Content Processing Using HBaseChicago Data Summit: Geo-based Content Processing Using HBase
Chicago Data Summit: Geo-based Content Processing Using HBase
 
Road show 2015 triangle meetup
Road show 2015 triangle meetupRoad show 2015 triangle meetup
Road show 2015 triangle meetup
 
Open vStorage Meetup - Santa Clara 04/16
Open vStorage Meetup -  Santa Clara 04/16Open vStorage Meetup -  Santa Clara 04/16
Open vStorage Meetup - Santa Clara 04/16
 

Similar to JDG DEMO: Consistent Hashing and Topologies

Scaling Hadoop at LinkedIn
Scaling Hadoop at LinkedInScaling Hadoop at LinkedIn
Scaling Hadoop at LinkedInDataWorks Summit
 
Big data talk barcelona - jsr - jc
Big data talk   barcelona - jsr - jcBig data talk   barcelona - jsr - jc
Big data talk barcelona - jsr - jcJames Saint-Rossy
 
20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_db20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_dbhyeongchae lee
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDBMongoDB
 
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and HadoopIOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and HadoopLeons Petražickis
 
GraphTour - Closing Keynote
GraphTour - Closing KeynoteGraphTour - Closing Keynote
GraphTour - Closing KeynoteNeo4j
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionBrian Enochson
 
Building a High Performance Analytics Platform
Building a High Performance Analytics PlatformBuilding a High Performance Analytics Platform
Building a High Performance Analytics PlatformSantanu Dey
 
Avoiding big data antipatterns
Avoiding big data antipatternsAvoiding big data antipatterns
Avoiding big data antipatternsgrepalex
 
Cost Effectively Run Multiple Oracle Database Copies at Scale
Cost Effectively Run Multiple Oracle Database Copies at Scale Cost Effectively Run Multiple Oracle Database Copies at Scale
Cost Effectively Run Multiple Oracle Database Copies at Scale NetApp
 
Quick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage ClusterQuick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage ClusterPatrick Quairoli
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 
LuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into LuceneLuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into Luceneeby
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Neo, Titan & Cassandra
Neo, Titan & CassandraNeo, Titan & Cassandra
Neo, Titan & Cassandrajohnrjenson
 

Similar to JDG DEMO: Consistent Hashing and Topologies (20)

Scaling Hadoop at LinkedIn
Scaling Hadoop at LinkedInScaling Hadoop at LinkedIn
Scaling Hadoop at LinkedIn
 
Big data talk barcelona - jsr - jc
Big data talk   barcelona - jsr - jcBig data talk   barcelona - jsr - jc
Big data talk barcelona - jsr - jc
 
20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_db20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_db
 
NOSQL in the Cloud
NOSQL in the CloudNOSQL in the Cloud
NOSQL in the Cloud
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout Session
 
Couchbase Data Pipeline
Couchbase Data PipelineCouchbase Data Pipeline
Couchbase Data Pipeline
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDB
 
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and HadoopIOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop
 
GraphTour - Closing Keynote
GraphTour - Closing KeynoteGraphTour - Closing Keynote
GraphTour - Closing Keynote
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
Building a High Performance Analytics Platform
Building a High Performance Analytics PlatformBuilding a High Performance Analytics Platform
Building a High Performance Analytics Platform
 
HDFS Erasure Coding in Action
HDFS Erasure Coding in Action HDFS Erasure Coding in Action
HDFS Erasure Coding in Action
 
Avoiding big data antipatterns
Avoiding big data antipatternsAvoiding big data antipatterns
Avoiding big data antipatterns
 
Big Data training
Big Data trainingBig Data training
Big Data training
 
Cost Effectively Run Multiple Oracle Database Copies at Scale
Cost Effectively Run Multiple Oracle Database Copies at Scale Cost Effectively Run Multiple Oracle Database Copies at Scale
Cost Effectively Run Multiple Oracle Database Copies at Scale
 
Quick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage ClusterQuick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage Cluster
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 
LuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into LuceneLuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Neo, Titan & Cassandra
Neo, Titan & CassandraNeo, Titan & Cassandra
Neo, Titan & Cassandra
 

More from Ugo Landini

Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondUgo Landini
 
Osd 2016 Middleware Track
Osd 2016 Middleware TrackOsd 2016 Middleware Track
Osd 2016 Middleware TrackUgo Landini
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentationUgo Landini
 
"Pubblica il tuo gioco sugli app store in pochi giorni"
"Pubblica il tuo gioco sugli app store in pochi giorni""Pubblica il tuo gioco sugli app store in pochi giorni"
"Pubblica il tuo gioco sugli app store in pochi giorni"Ugo Landini
 
Scala Primi Passi
Scala Primi PassiScala Primi Passi
Scala Primi PassiUgo Landini
 

More from Ugo Landini (11)

Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
Fuse webinar
Fuse webinarFuse webinar
Fuse webinar
 
Osd 2016 Middleware Track
Osd 2016 Middleware TrackOsd 2016 Middleware Track
Osd 2016 Middleware Track
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
Data grid
Data gridData grid
Data grid
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentation
 
"Pubblica il tuo gioco sugli app store in pochi giorni"
"Pubblica il tuo gioco sugli app store in pochi giorni""Pubblica il tuo gioco sugli app store in pochi giorni"
"Pubblica il tuo gioco sugli app store in pochi giorni"
 
2.5 Tiers
2.5 Tiers2.5 Tiers
2.5 Tiers
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Objective C
Objective CObjective C
Objective C
 
Scala Primi Passi
Scala Primi PassiScala Primi Passi
Scala Primi Passi
 

Recently uploaded

UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 

Recently uploaded (20)

UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 

JDG DEMO: Consistent Hashing and Topologies

  • 1. ROME 27-28 march 2015 – Ugo Landini Quick Start Lab JBoss Data Grid Ugo Landini
 Senior Solution Architect
 ugol@redhat.com
 March 26th 2015
  • 2. Quick Start Lab - JBoss Data Grid2 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 3. Quick Start Lab - JBoss Data Grid3 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 4. Quick Start Lab - JBoss Data Grid4 new generation of technologies ... designed to economically extract value from very large volumes of a wide variety of data, by enabling high velocity capture, discovery and/or analysis IDC, 2012 Big Data
  • 5. Quick Start Lab - JBoss Data Grid5 Not Only SQL Just an alternative to RDBMS NoSQL
  • 6. Quick Start Lab - JBoss Data Grid6 K/V Store Document Store Column based DB Graph DB XML, Object DB, Multidimensional, Grid/Cloud, … see map on https://451research.com/images/Marketing/dataplatformsmapoctober2014.pdf NoSQL
  • 7. Quick Start Lab - JBoss Data Grid7 NoSQL
  • 8. Quick Start Lab - JBoss Data Grid8 We’re here NoSQL
  • 9. Quick Start Lab - JBoss Data Grid9 •Very hard to categorise in a systematic way •Many nuances •Many cases of “Evolutionary Convergence” •i.e. evolving similar features having to adapt to similar environments NoSQL
  • 10. Quick Start Lab - JBoss Data Grid10 CAP Theorem
  • 11. Quick Start Lab - JBoss Data Grid11 •Brewer’sTheorem (2000, proven in 2002) •Three guarantees of a Distributed System •Consistency •Availability •PartitionTolerance CAP Theorem
  • 12. Quick Start Lab - JBoss Data Grid12 All nodes see the same data at the same time Consistency
  • 13. Quick Start Lab - JBoss Data Grid13 A guarantee that every request receives a response about whether it succeeded or failed Availability
  • 14. Quick Start Lab - JBoss Data Grid14 The system continues to operate despite arbitrary message loss or failure of part of the system Partition Tolerance
  • 15. Quick Start Lab - JBoss Data Grid15 The system continues to operate despite arbitrary message loss or failure of part of the system Partition Tolerance
  • 16. Quick Start Lab - JBoss Data Grid16 Consistency: Transactions Availability: Redundancy Partition Tolerance: Scaleout CAP: Popular Version
  • 17. Quick Start Lab - JBoss Data Grid17 Consistency: Transactions Availability: Redundancy Partition Tolerance: Scaleout NO GO CAP: Popular Version
  • 18. Quick Start Lab - JBoss Data Grid18 Consistency: Transactions Availability: Redundancy Partition Tolerance: Scaleout RDBMS CAP: Popular Version
  • 19. Quick Start Lab - JBoss Data Grid19 Consistency: Transactions Availability: Redundancy Partition Tolerance: Scaleout NoSQL CAP: Popular Version
  • 20. Quick Start Lab - JBoss Data Grid20 Brewer wrote an essay in 2012 to clarify some of the CAP implications http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed CAP: Modern Version
  • 21. Quick Start Lab - JBoss Data Grid21 The "two out of three" concept can be misleading or misapplied and it should be considered as a tautology Many vendors used CAP theorem just as an excuse to sacrifice Consistency CAP: Modern Version
  • 22. Quick Start Lab - JBoss Data Grid22 Partitions are rare, so there is little reason to forfeit C or A when the system is not partitioned The choice between C and A can occur many times within the same system at very fine granularity CAP: Modern Version
  • 23. Quick Start Lab - JBoss Data Grid23 Different decisions about C and A: •for different operations •for different data •in different moments CAP: Modern Version
  • 24. Quick Start Lab - JBoss Data Grid24 Finally, C, A e P are more continuos than binary: •A is obviously continuous •Many levels of Consistency (think isolation level in classic DB) •Even Partitions have nuances, including disagreement within the system about whether a partition exists CAP: Modern Version
  • 25. Quick Start Lab - JBoss Data Grid25 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 27. 27 Virtual Machine 1 Client Cache RDBMS read & write •Single JVM •few memory •no HA Local Caching
  • 28. 28 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 1. Client 1 reads A First try at distributed caching
  • 29. 29 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 2. Client 1 writes A to Cache 1 First try at distributed caching
  • 30. 30 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 3. Client 2 writes A2 to RDBMS First try at distributed caching
  • 31. 31 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 4. Client 1 reads A from Cache 1 First try at distributed caching
  • 32. 32 Distributed Caching on many nodes What about dirty reads? (i.e. how to cope with multiple writes, invalidation, etc.) First try at distributed caching
  • 33. 33 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 1. Client 2 writes A2 to RDBMS Second try at distributed caching
  • 34. 34 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 2. Client 2 updates Cache 2 Second try at distributed caching
  • 35. 35 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 3. sync Caches Second try at distributed caching
  • 36. 36 Virtual Machine 1 Client 1 Cache 1 RDBMS Virtual Machine 2 Client 2 Cache 2 1. Client 1 reads A2 from Cache 1 Second try at distributed caching
  • 37. Quick Start Lab - JBoss Data Grid37 New Cache topology Startup time State transfers Incompatible JVM tunings GCs Non Java clients Second try at distributed caching
  • 38. Quick Start Lab - JBoss Data Grid38 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • Infinispan/JDG features • Q&A Agenda
  • 39. Quick Start Lab - JBoss Data Grid39 Hashing Wheel: a mathematical “wheel” on which you hash Ks (keys) and Ns (nodes). The relative position of Ks and Ns determines which Node is the “owner” of that particular K in a topology Consistent Hashing
  • 40. Quick Start Lab - JBoss Data Grid40 N1 Node 1 N2 N3 Node 2 Node 3 Consistent Hashing
  • 41. Quick Start Lab - JBoss Data Grid41 Ns (nodes) on the “wheel” partition the hash space in segments Every segment contains a range of Ks Consistent Hashing
  • 42. Quick Start Lab - JBoss Data Grid42 N1 Node 1 N2 N3 Node 2 Node 3 K250 Consistent Hashing
  • 43. Quick Start Lab - JBoss Data Grid43 N1 Node 1 N2 N3 Node 2 Node 3 K250 owner = N2 Consistent Hashing
  • 44. Quick Start Lab - JBoss Data Grid44 N1 Node 1 N2 N3 Node 2 Node 3 K250 K570 K700 K900 K53 Consistent Hashing
  • 45. Quick Start Lab - JBoss Data Grid45 Going clockwise from the K: •the first N is the owner •next N is the replica •next next N could be another replica, and so on Consistent Hashing
  • 46. Quick Start Lab - JBoss Data Grid46 N1 Node 1 N2 N3 Node 2 Node 3 K250 K570 K700 K900 K53 owner = N2 replica = N3 Consistent Hashing
  • 47. Quick Start Lab - JBoss Data Grid47 What happens if a node dies? Consistent Hashing
  • 48. Quick Start Lab - JBoss Data Grid48 N1 Node 1 N3 Node 2 Node 3 K250 K570 K700 K900 K53 owner = N2 replica = N3 Consistent Hashing
  • 49. Quick Start Lab - JBoss Data Grid49 N1 Node 1 N3Node 3 K250 K570 K700 K900 K53 Consistent Hashing
  • 50. Quick Start Lab - JBoss Data Grid50 N1 Node 1 N3Node 3 K250 K570 K700 K900 K53 owner = N3 replica = N1 Consistent Hashing
  • 51. Quick Start Lab - JBoss Data Grid51 The real CH algorithm implemented in JDG is slightly different CH is optimized to minimize state transfer (i.e. number of keys moving when a node dies or a new one joins the cluster) Consistent Hashing
  • 52. Quick Start Lab - JBoss Data Grid52 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 53. Quick Start Lab - JBoss Data Grid53 Distributed Memory Storage Engine Networked Memory A Distributed Cache “on steroids” ATransactional NoSQL What’s a Data Grid?
  • 54. Quick Start Lab - JBoss Data Grid54 •Key/Value storage •Search Engine (from K/V to Document storage) •Linear Scalability, Elasticity and Fault tolerance •Thanks to CH •Memory based •Persistence engines are optional What’s a Data Grid?
  • 55. Quick Start Lab - JBoss Data Grid55 •DifferentTopologies •Querying •Task Execution & Map/Reduce •Partition Handling •Data Affinity (to squeeze every bit of performance) Data Grid > Distributed Caching
  • 56. Quick Start Lab - JBoss Data Grid56 •LOCAL •INVALIDATION •REPLICATED •DISTRIBUTED JDG Cache Topologies (Cluster modes)
  • 57. Quick Start Lab - JBoss Data Grid57 •LOCAL •simple cache (EHCache-like) •INVALIDATION •REPLICATED •DISTRIBUTED JDG Cache Topologies (Cluster modes)
  • 58. Quick Start Lab - JBoss Data Grid58 •LOCAL •INVALIDATION •no sharing •REPLICATED •DISTRIBUTED JDG Cache Topologies (Cluster modes)
  • 59. Quick Start Lab - JBoss Data Grid59 •LOCAL •INVALIDATION •REPLICATED •All node are equals •4 Nodes @ 8 GB = 8 GB •DISTRIBUTED JDG Cache Topologies (Cluster modes)
  • 60. Quick Start Lab - JBoss Data Grid60 •LOCAL •INVALIDATION •REPLICATED •DISTRIBUTED •For example: 1 Replica •4 Nodes @ 8 GB = 16 GB JDG Cache Topologies (Cluster modes)
  • 61. 61 Server B JDG 3 JDG 4 Server A JDG 1 JDG 2 cluster 4 JDG Nodes on 2 servers A Simple Grid
  • 62. 62 JDG 1 JDG 2 JDG 3 JDG 4 K0 K1 K6 K3 K8 K2 K4 K9 K5 K7 Distributed without Replica
  • 63. 63 JDG 1 JDG 2 JDG 3 JDG 4 K0 K1 K6 K3 K8 K2 K4 K9 K5 K7 K5 K2 K9 K7 K4 K3 K1 K0 K8 K6 Distributed with Replica
  • 64. 64 JDG 1 JDG 2 JDG 3 JDG 4 K0K1 K6 K3 K8 K2 K4 K9K5 K7 K0K1 K6 K3 K8 K2 K4 K9K5 K7 K0K1 K6 K3 K8 K2 K4 K9K5 K7 K0K1 K6 K3 K8 K2 K4 K9K5 K7 Replicated
  • 65. Quick Start Lab - JBoss Data Grid65 •Replicated: •“Small” set of data with high % of reads vs writes •Distributed: •“Big” set of data: linear scaling •You need M/R & Distexec How do I choose?
  • 66. Quick Start Lab - JBoss Data Grid66 •You can have different Cache configurations in the same CacheManager •mix&match Replicated and Distributed as needed JDG Cache Topologies (Cluster modes)
  • 67. Quick Start Lab - JBoss Data Grid67 •Default hashing (Distributed mode): MurmurHash3. •It’s a simple and standard Hashing: •you can change it as you like, f.e. if your key already identifies a partitioning criteria Tuning your hashing
  • 68. Quick Start Lab - JBoss Data Grid68 •Can be “fine tuned” in 4 different ways: •Server Hinting •Virtual Servers •Grouping •Key Affinity Tuning your hashing
  • 69. Quick Start Lab - JBoss Data Grid69 •A triple (site, rack, server) •You increase availability avoiding that replicas ends up in the same (site, rack, server) of the master Server Hinting
  • 70. Quick Start Lab - JBoss Data Grid70 •Number of di “segments” in which the cluster is partitioned •Improve the node distribution on the hashing wheel to have a better distribution of keys •Default: 60 Virtual Servers
  • 71. Quick Start Lab - JBoss Data Grid71 •Data colocation •A cache node contains K but also other relevant data afferent to K •Example: customer and its bank movements •You just have to define a group, JDG will colocate all data of the same group in the same node Grouping
  • 72. Quick Start Lab - JBoss Data Grid72 •Like Grouping, but from another perspective: •You just ask a node for a key that will be hashed on that node •Grouping/Affinity are your best friends if you want to reach JDG Nirvana! Key Affinity
  • 73. Quick Start Lab - JBoss Data Grid73 •All data needed by a node of your application are local, at the distance of a single Java method call JDG Nirvana
  • 74. Quick Start Lab - JBoss Data Grid74 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 75. Quick Start Lab - JBoss Data Grid75 •Small self-contained projects that can be used to simply explain JDG to customers •https://github.com/redhat-italy/jdg-quickstarts JDG Quickstarts
  • 76. Quick Start Lab - JBoss Data Grid76 • Big Data & NoSQL: super quick introduction to terminology • What developers do to scale out • Consistent Hashing • What’s a Data Grid • DEMO • Infinispan/JDG features • Q&A Agenda
  • 77. Quick Start Lab - JBoss Data Grid77 •If JDG detects a split brain, partitions enter in degraded mode •A degraded partition can read/write ONLY fully owned keys •A partition fully owns a key if contains master and replicas nodes for that key •You’ll get an AvailabilityException for other keys Partition Handling
  • 78. Quick Start Lab - JBoss Data Grid78 •Cache Store •Not only in memory! •Write through & write behind (ACK sync or async) •Pluggable “drivers” •File System, JPA, LevelDB (supported) •MongoDB, Cassandra, BerkeleyDB, etc. (community) Persistence
  • 79. Quick Start Lab - JBoss Data Grid79 •To avoid Out Of Memory •Entry can be “passivated” on disk (you’ll need a CacheStore) Eviction
  • 80. Quick Start Lab - JBoss Data Grid80 •To avoid Out Of Memory •Entry can be “passivated” on disk (you’ll need a CacheStore) Eviction
  • 81. Quick Start Lab - JBoss Data Grid81 •You assign a lifespan or a max idle time to a key •The key will then be automatically removed after that time •You don’t need to write “Garbage Clean code” Expiry
  • 82. Quick Start Lab - JBoss Data Grid82 Expiry
  • 83. Quick Start Lab - JBoss Data Grid83 •Both avoid Out Of Memory •“Evicted” data can be maintained in the Grid with Passivation •Eviction is a Cache configuration •Expiration is a Key configuration •Expiration could be a business requisite •Eviction is a system feature Eviction/Expiry: differences
  • 84. Quick Start Lab - JBoss Data Grid84 •JDG has full support for transactions •LocalTransactions •GlobalTransactions (XA): if running inside an AS automatically uses itsTX Manager •Batching API Transactions
  • 85. Quick Start Lab - JBoss Data Grid85 •Cache/CacheManager events •Topology changes •Entries being added, removed, modified •Cluster listeners Listener/Notifications
  • 86. Quick Start Lab - JBoss Data Grid86 •Infinispan-query module •Hibernate Search & Lucene •Querying via DSL •Lucene indexes can be kept in memory, on disk or in the grid Querying the grid
  • 87. Quick Start Lab - JBoss Data Grid87 •with M/R you can implement distributed global operation on the grid •Each node works on its data (Map) •Results are later aggregated (Reduce) Map/Reduce
  • 88. Quick Start Lab - JBoss Data Grid88 Map/Reduce
  • 89. Quick Start Lab - JBoss Data Grid89 Map/Reduce
  • 90. Quick Start Lab - JBoss Data Grid90 •JDG 7 will implement HDFS API •So it will be able to act as a super fast Hadoop store Hadoop, coming soon…
  • 91. Quick Start Lab - JBoss Data Grid91 •With Distexec you can submit “tasks” to the Grid •The task can be executed on each node or on a subset of the nodes •The task can modify data in the Grid Distributed Execution (Distexec)
  • 92. Quick Start Lab - JBoss Data Grid92 Cross Site Replication
  • 93. Quick Start Lab - JBoss Data Grid93 •“Follow the Sun” architectures •Many different clusters that can be kept in sync Cross Site Replication
  • 94. Quick Start Lab - JBoss Data Grid94 •JSR-107 •JavaTemporary Caching API •Confirmed in January 2015 •In roadmap for JDG 6.5 •JSR-347 •Data Grids for the Java Platform •JSR Retired in January 2015 Standard APIs
  • 95. Quick Start Lab - JBoss Data Grid95 •Command Line Console •JMX •JON Plugin Management Tooling
  • 96. Quick Start Lab - JBoss Data Grid96 •User Authentication •SASL •Role Based Access Control (RBAC) •Users, Roles and mapping between roles and operations on Cache / Cache-Manager •Node Authentication & Authorisation •Encrypted communication between nodes Data Security
  • 97. Quick Start Lab - JBoss Data Grid97 •Library mode •Embedded in your JVM •C/S mode •REST •Memcached •Hot Rod Embedded vs Client/Server
  • 98. Quick Start Lab - JBoss Data Grid98 Embedded vs Client/Server
  • 99. Quick Start Lab - JBoss Data Grid99 Protocol Client Libs Smart Routing Load Balancing/ Failover TX Listeners M/R Dist Querying Separated Cluster Library mode inVM N/A Yes Dynamic Yes Yes Yes Yes Yes No REST Text HTTP No Any HTTP load balancer No No No No No Yes Memcached Text Many No Predefined server list No No No No No Yes Hot Rod Binary Java/ Python/ C++ Yes Dynamic Local w MVCC Yes (6.4) No No Yes (6.3) Yes Protocol Comparison
  • 100. ROME 27-28 march 2015 – Ugo Landini Q&A
  • 101. ROME 27-28 march 2015 – Ugo Landini Thank You! Leave your feedback on Joind.in! https://joind.in/event/view/3347 Quick Start Lab JBoss Data Grid Ugo Landini
 Senior Solution Architect
 ugol@redhat.com
 March 26th 2015