"JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

15

Click here to load reader

description

This is a presentation held at eLiberatica 2009. http://www.eliberatica.ro/2009/ One of the biggest events of its kind in Eastern Europe, eLiberatica brings community leaders from around the world to discuss about the hottest topics in FLOSS movement, demonstrating the advantages of adopting, using and developing Open Source and Free Software solutions. The eLiberatica organizational committee together with our speakers and guests, have graciously allowed media representatives and all attendees to photograph, videotape and otherwise record their sessions, on the condition that the photos, videos and recordings are licensed under the Creative Commons Share-Alike 3.0 License.

Transcript of "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

Page 1: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

Professional Open Source™

1

JBoss clustering solutions

Mircea Markus, JBoss R&D

Page 2: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

2

Professional Open Source

Agenda

o Clustering terminology

o JBoss clustering backboneoJGroups

oJBossCache

oPojoCache

o The future – Infinispan

o Q&A

Page 3: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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?

Page 4: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

4

Professional Open Source

Load Balancing != Fault Tolerance

Load balancing is used for scalability, not for fault tolerance

Page 5: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

5

Professional Open Source

Load Balancing != Fault Tolerance

State Replication

Failover and state replication is used for fault tolerance

Page 6: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 7: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 8: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 9: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 10: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 11: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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)

Page 12: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 13: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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

Page 14: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

14

Professional Open Source

Infinispan – async API

o New API in Infinispan, major feature for 4.0

o Hybrid between sync and async calls

Page 15: "JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ eLiberatica 2009

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