"JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009
Click here to load reader
-
Upload
eliberatica -
Category
Technology
-
view
1.703 -
download
0
description
Transcript of "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009
Professional Open Source™
1
JBoss clustering solutions
Mircea Markus, JBoss R&D
2
Professional Open Source
Agenda
o Clustering terminology
o JBoss clustering backboneoJGroups
oJBossCache
oPojoCache
o The future – Infinispan
o Q&A
3
Professional Open Source
Clustering terminology
o Scalabilityo I want to handle x times the number of concurrent requests than I can now
o High availabilityo Services are accessible with reasonable (and predictable) response times at any time
o E.g., 99.999 (5 Nines in Telco)
o Load balancingo A way to obtain scalability and better performance by dispatching incoming requests to different
servers
o Session affinity (or stickiness)
o Checking heart beat
o Failovero Process can continue when it is re-directed to a “backup” node because the original one fails
o What is the policy? Round-robin?
o Fault toleranceo A service that guarantees strictly correct behavior despite system failure
o Cost?
4
Professional Open Source
Load Balancing != Fault Tolerance
Load balancing is used for scalability, not for fault tolerance
5
Professional Open Source
Load Balancing != Fault Tolerance
State Replication
Failover and state replication is used for fault tolerance
6
Professional Open Source
Cost of Fault Tolerance
For fault tolerance, state must be available to the failover node
– Shared persistent store
• Caching is a problem; need cache invalidation
– Replicated state
Synchronous vs. Asynchronous Replication
– Reduced application responsiveness vs. chance that failover occurs before state arrives
Analyze the likelihood of failure
– How much fault tolerance is needed?
Limit amount of replicated state
– Entity data can be reconstructed
– Consider keeping short term-conversational state on client
• Form data from a wizard
7
Professional Open Source
JGroups
o Library for reliable multicasting
o Provides
o Fragmentation
o Message retransmission
o Flow control
o Ordering
o Group membership, membership change notification
o LAN or WAN based
o IP multicasting transport default for LAN
o TCP transport default for WAN
8
Professional Open Source
JBossCache
o Replicated in memory data repository
o Either locally or cluster-wide
o Support for eviction of unused elements
o Cache loading/storing to disk to free up memory
o Chaining caches, remote caches using TcpCacheLoader
o Support for JTA transactions
o Listeners and notifications
o JMX manageability
o Multiple locking schemes (MVCC recommanded)
o JGroups as a network stack
9
Professional Open Source
PojoCache
oExtension of core cache
oOptimised for caching large and complex objects with relationships
oObject relationships maintained, even after replication or persistence
oFine-grained replication
oMinimal API
10
Professional Open Source
Where is JBossCache used?
o JBoss Application Server - Clustering HTTP and EJB sessions, JPA entities
o Hibernate - entity caching
o SEAM - caching JSF generated content
o JBoss Portal
o Lucene/Hibernate Search - cluster-wide indexes
o GridGain - data grid component to complement compute grid
o Coming soon:
– Drools - clustering rules engines
– Mobicents – VOIP SIP server clustering
o Many other open source and commercial projects
11
Professional Open Source
Infinispan – the future
o JBossCache is now in maintenance
o simple-to-use Map interface
o Replication
o Total
oDistribution/consistent hashing – virtually linear scalability
o Transaction support enhancement - XAResource
o Data eviction redesign
o JSR-107 compliant
o Benchmark to come! (CacheBenchmarkFramework)
12
Professional Open Source
Infinispan - data persistence
o Useful for
o ‘warm’ starts
oSurvive server restarts
oSwap data to disk to avoid OOM
o Several ‘CacheStore’ implementations
oJDBC
oFile system
oAmazon S3 (http://code.google.com/p/jclouds)
oJDBM
13
Professional Open Source
Infinispan – datagrid platform
o Data grid
oUniform sea of memory
oSpread over several servers
o Solution to database limitations
oPhysical limitations
oDB does not scale
o “memory is the new disk, disk is the new tape” - Tim Bray
14
Professional Open Source
Infinispan – async API
o New API in Infinispan, major feature for 4.0
o Hybrid between sync and async calls
15
Professional Open Source
New cool things to come!
omemcached server/clients, able to use from Python, Ruby, C++, C#
oQuery API - do remote searches
oMap/Reduce - pass the cache a Callable and have it execute wherever the data exists
oJPA-style API. Easy migration from using a database to using the grid!
oCheck it out here! http://www.jboss.org/infinispan