Professional Documents
Culture Documents
Memory Hierarchy
RR
<1
<1
ns
L1
ns
L1
~4
~4cycles,
cycles,
~1ns
~1ns
L2
L2
~10
~10cycles,
cycles,~3ns
~3ns
L3
L3
~42
cycles,
~42 cycles,~15ns
~15ns
Cost
DRAM
DRAM
>65ns
>65ns
Flash
Flash // SSD
SSD // USB
USB
Storag
e term
HDD
HDD
Tapes,
Tapes,Remote
Remotesystems,
systems,etc
etc
Max A. Alexejev
Software caches
Improve response times by reducing data access
latency
Offload persistent storages
Only work for IO-bound applications!
Max A. Alexejev
Shared
Shared
Remote
Remote
Distributi
Distributi
on
on
algorithm
algorithm
Hierarchica
Hierarchica
ll
Distributed
Distributed
Max A. Alexejev
Max A. Alexejev
Max A. Alexejev
Max A. Alexejev
Max A. Alexejev
Low
latency
Linear
horizont
al
scalabili
ty
Distribut
ed cache
Max A. Alexejev
Client
Client
Cach
Cach
ee
existing.
6. Write it to the cache
DB
DB
Overall:
Increases reads performance
Offloads DB reads
Introduces race conditions for writes
10
Max A. Alexejev
Client
Client
key
2. Check the cache
3. If data is in the cache return it to the user
Cach
Cach
ee
11
Max A. Alexejev
DB
DB
Client
Client
Cach
Cach
ee
writes
12
Max A. Alexejev
DB
DB
Client
Client
updates existing.
2. Write it to the cache
3. Cache adds writes request to its
internal queue.
Cach
Cach
ee
13
Max A. Alexejev
DB
DB
Hazelcast
Hazelcast
Cassandra
Cassandra
Redis
Redis
Infinispan
Infinispan
EhCache
EhCache
14
Terracotta
Terracotta
MongoDB
MongoDB
Max A. Alexejev
KV
KV
caches
caches
NoSQL
NoSQL
Data
Data
Grids
Grids
Memcache
d
Redis
Oracle
Coherence
Ehcache
Cassandra
GemFire
MongoDB
GigaSpace
s
GridGain
Hazelcast
Infinispan
15
Max A. Alexejev
Max A. Alexejev
Key-Value caches
17
Max A. Alexejev
Memcached
18
Developed for
LiveJournal in 2003
EHCache
19
Max A. Alexejev
NoSQL Systems
A whole bunch of different products with both
full-blown RDBMS
20
Max A. Alexejev
21
Max A. Alexejev
Written in C, supported by
VMWare
Supports transactions
22
Max A. Alexejev
Case study:
Cassandra
23
Max A. Alexejev
Inspired by Amazon
Dynamo replication
mechanics, but uses
column-based data model.
Max A. Alexejev
IMDG: Evolution
Data
Data Grids
Grids
Computational
Computational
Grids
Grids
Reliable
Reliable storage
storage
and
live
data
and live data
balancing
balancing among
among
grid
nodes
grid nodes
Reliable
Reliable jobs
jobs
execution,
execution,
scheduling
scheduling and
and
load
balancing
load balancing
Moder
Moder
n
n
IMDG
IMDG
25
Max A. Alexejev
Caching scheme partitioned or distributed, may be specified per cache or cache service
Live data redistribution when nodes are going up or down no data loss, no clients
termination
Supports RT, WT, WB caching patterns and hierarchical caches (near caching)
26
Max A. Alexejev
27
Max A. Alexejev
code.
3. Node is identified by partition number.
4. Request is then routed to identified node,
28
Max A. Alexejev
29
Max A. Alexejev
Max A. Alexejev
use.
GigaSpaces: commercial.
GridGain: commercial.
Hazelcast: open-source.
Infinispan: open-source.
31
Max A. Alexejev
Terracotta
A company behind EHCache, Quartz and Terracotta Server Array.
Acquired by Software AG.
32
Max A. Alexejev
33
Max A. Alexejev
Max A. Alexejev
QA Session