Transcript
Red Hat Confidential
Distributed Cache & Data Grid PlatformPRESENTED BY: Jaehong Cheon| | DATE: 12/11/2013
About Speaker
전재홍- 한화 S&C, 모바일 플랫폼 개발- JBoss User Group Korea 커뮤니티 - JBUG Korea 인피니스팬 스터디 그룹- “JBoss 인피니스팬 따라잡기” 번역
Agenda
Data Grid
Infinispan
Infinispan Key Features
Use Cases
References
Red Hat ConfidentialRed Hat Confidential
Data Grid
Distributed Cache
Fast access to data
Performance boost
Elasticity
High Availability
JSR 107 (Temporary Caching for the Java Platform)
– read, write, expiration, write-through, distribution
– JBoss Cache
Distributed Cache
Persis-tence
(Database)
DistributedCacheCluster
Cache
Cache
Cache
App
App
App
Data Grid
Evolution of distributed caches
Well-known pattern to boost data access performance and scalability
Clustered by nature
JSR 347 (Data Grids for the Java Platform)
– Querying, map-reducing standard way, consistency
– Infinispan
Red Hat ConfidentialRed Hat Confidential
Infinispan
Infinispan
Distributed in-memory key/value data grid and cache
Distributed as library and server
Highly available
Elastic
Manageable
Open Source
Architecture: Standalone Lib
JCP 107 Style Cache– Just cache with advantages: expiry, j2ee transaction
Library Mode - standalone
Infinispan
JVM
App
Architecture: Clustered Lib
Use as library– More feature
– Richer APIs
– Programmatic/declarative configu-ration
– Extendable/embed-dable
– Faster (API call)
– App doesn’t know it’s on cluster
Library Mode
Cluster
Infinispan
JVM
App
Infinispan
JVM
App
Infinispan
JVM
App
Architecture: Server
Use as server– Remote
• Memcached, REST, Hot Rod, WebSocket
– Data tier shared by multiple apps
– App doesn’t af-fect cluster
– Non-java clients• Java, C++,.NET,
Ruby, Python
Server Mode
Cluster
Infinispan
JVM
Infinispan
JVM
Infinispan
JVM
App
App
App
Architecture: Durability
Durability– By replication
– By persistence
– By replication to other cluster (topology aware)
Durability
Cluster
Infinispan
JVM
Infinispan
JVM
Cluster
InfinispanJVM
InfinispanJVM
persis-tence
Clustering
Peer to Peer– No central master, no single point of failure, no sin-
gle bottle neck
JGroups– Reliable multicast communication library, nodes
discovery, sharing data, performing cluster scaling
Consistent Hash– Hash based data distribution
– How it finds where data locates
Linear in nature: throughput, capacity
Cluster Mode: Replication
Replication Mode
Cache onServer 1 K,V
Cache onServer 2 K,V
Cache onServer 4 K,V
Cache onServer 3 K,V
cache.put(K,V)
Cluster Mode: Distribution
Distribution Mode(numOwners=2)
Cache onServer 1 K,V
Cache onServer 2 K,V
Cache onServer 4
Cache onServer 3
cache.put(K,V)
cache.get(K,V)
Cluster Mode: Invalidation
Invalidation Mode
Cache onServer 1
K,V2
Cache onServer 2 K,V
Cache onServer 4
Cache onServer 3
cache.put(K,V2)
DB
Monitoring/Management
MBeans on CacheManager, Cache
RHQ (JON, JBoss Operations Network)
Red Hat ConfidentialRed Hat Confidential
InfinispanKey Features
Key Features: Persistence
Used for durability
Cache Store – persistence storage– File System, Cloud, Remote, JDBC, JPA, LevelDB,
Cassandra, HBase, MongoDB, BerkeleyDB, JDBM, REST
Write-through, write-behind
Store chain
Shared store
Key Features: Transactions
JTA Transaction Support
Support MVCC (Multi-Versioned Concurrency Con-trol)
Isolation Level– READ_COMMITTED (default)
– REPEATABLE_READ
Locking Mode– Optimistic Lock (default)
– Pessimistic Lock
Key Features: Query
JBoss Hibernate Search + Apache Lucene
Query on values
Index Directory– Lucene Directory: in-memory, file system, JDBC
– Infinispan Directory
Distributed Queries
Key Features: Map/Reduce
Based on Distributed Execution Framework
Mapper, Reducer, Collator, MapReduceTask
JDG, JBoss Data Grid
Red Hat JBoss Data Grid
Infinispan-based
JON
All the benefits of sub-scription, including Red Hat world class support and services
Red Hat ConfidentialRed Hat Confidential
Use Cases
Infinispan on JBoss AS7
Used for WAS clustering, Hibernate L2 cache
Application gets cache with JNDI name us-ing @Resource
Session Clustering
Big Data Real-time Process-ing
Infinispan Data Grid
Red Hat ConfidentialRed Hat Confidential
References
References
infinispan.org blog.infinispan.org infinispan-ko.blogspot.com facebook.com/groups/infinispan red.ht/data-grid tedwon.com/display /dev/Infinispan+Data+Grid cbcpascal.blogspot.kr
top related