InfoQ

News

JBoss Cache 1.4 Released; Adds Buddy Replication

Posted by Floyd Marinescu on Jul 17, 2006

Community
Java
Topics
Clustering & Caching
Tags
JBoss Cache
JBoss has released JBoss Cache 1.4 final, their distributed caching product which also includes PojoCache (formerly TreeCacheAOP).  The release adds Buddy Replication and Data Gravitation features and also optimizes their RPC marshalling algorithm resulting in 20-50% improved performance and throughpout. JBoss Cache is the technology behind JBoss Application Server's HTTP and EJB session replication.  InfoQ spoke to project leads Ben Wang and Manik Surtani to get more information.

Previously, JBoss Cache multicasted cache changes across all nodes in the cluster, which would make it inefficient for cases where cache data is partitioned (such as when you have session affinity). With the new buddy replication feature, instead each server instance picks one or more 'buddies' in the cluster, and only replicates to these specific buddies.  When asked about why one needs distributed caching if you have a cluster with session affinity, responded:
when you have a local cache+session affinity, you'd still want some replication for failover/high availability, one example being HTTP sessions.  This is where buddy replication comes in, improving efficiency so you don't end up replicating your entire state across the cluster - just to nominated backup nodes. 
Buddy Replication is an important feature for the project to gain in order for it to become suitable for larger deployments where inter-node communications overhead must be minimized. Other commercial solutions such as Tangosol or IBM's ObjectGrid have had this for some time. Terracotta doesn't use/need a buddy system since data is replicated to a central cache server.

JBoss Cache uses JGroups,  a group communication toolkit, to manage network-level communications between instances. Manik Surtani told InfoQ:
we've used this to build an RPC layer, wich we then use to replicate data across a cluster.  Using JGroups, we get a number of things for free, including group membership and organisation, guaranteed message delivery, and network stack tuning (switching between TCP and UDP, tunnelling through firewalls if necessary, etc).
PojoCache is a componeont of JBoss Cache which allows you to avoid interacting with the cache with a Map interface after update operations; instead, an object instance is added to the Cache with one initial PUT, and field-level changes to the object are intercepted transparently with aspects and then distributed across the cluster.

Ben Wang positioned JBoss Cache as a competitor to Tangosol (from the perspective of both being distributed Maps) and PojoCache as as more like Terracotta (from the AOP-driven, API-less perspective).
GigaSpaces cache by Guy Korland Posted Jul 20, 2006 10:49 AM
Re: GigaSpaces cache by Brian Ehmann Posted Jul 20, 2006 2:11 PM
Re: GigaSpaces cache by ARI ZILKA Posted Jul 22, 2006 9:45 PM
Re: GigaSpaces cache by Nati Shalom Posted Nov 10, 2007 9:28 PM
Clarifications by Cameron Purdy Posted Jul 21, 2006 6:48 PM
  1. Back to top

    GigaSpaces cache

    Jul 20, 2006 10:49 AM by Guy Korland

    GigaSpaces provides similar capabilities with a richer API based on JavaSpaces API (GigaSpaces also provides a simple Map API). But can also provide a full partitioned solution even if the session affinity isn't saved.

    Guy korland
    GigaSpaces: Write Once Scale Anywhere

  2. Back to top

    Re: GigaSpaces cache

    Jul 20, 2006 2:11 PM by Brian Ehmann

    It would be nice if Infoq could charge for inserting advertisements in comments?

    Brian E

  3. Back to top

    Clarifications

    Jul 21, 2006 6:48 PM by Cameron Purdy

    Buddy Replication is an important feature for the project to gain in order for it to become suitable for larger deployments where inter-node communications overhead must be minimized. Other commercial solutions such as Tangosol [..] have had this for some time.


    Tangosol Coherence does not use buddy replication. With "n" servers, it dynamically organizes a server mesh (partitioned as n x n, and dynamically load-balanced as n increases) that has a configurable depth (e.g. 3 for n plus 2 failover scenarios) that can be specified on a data set by data set basis.

    To compare:

  4. - With a buddy system and 100 servers, the death of a server will double the load on its buddy.

  5. - With a partitioned n x n mesh, the death of a server will increase the load on other servers by roughly 1 percent.


  6. This technologoy was introduced by Tangosol in June of 2002, and serves as the fundamental basis for much of the state-of-the-art in data grids today.

    Peace,

    Cameron Purdy
    Tangosol Coherence: The Java Data Grid

  • Back to top

    Re: GigaSpaces cache

    Jul 22, 2006 9:45 PM by ARI ZILKA

    I participated in a panel discussion with Floyd and Rod Johnson. At some point during the discussion Rod felt it necessary to interrupt someone and interjected, "Spring, Spring, Spring, Spring, Spring." He was clearly satirizing all the vendor-shpiel. Agree that when we as vendors feel embarrased, it has gone too far. I can't get "Spring, Spring, Spring" out of my head every time I see something like this. Thanks for raising a voice of sanity, Brian!

    --Ari

  • Back to top

    Re: GigaSpaces cache

    Nov 10, 2007 9:28 PM by Nati Shalom

    Brian

    This post mention some of the Caching solutions out there doing and solving similar problems.

    Other commercial solutions such as..


    From some reason the author missed GigaSpaces which is widely in the industry hence the reason for this comment. I would also mention Gemstone as another known caching product that should have been part of this list.
    Just an FYI one of the biggest phone launches (Can't be too specific at this stage) in Europe this weekend is based on a combination of JBoss/GigaSpaces. The main reason that users choose this combo is scalability.


    Nati S.
    GigaSpaces

  • Educational Content

    Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

    Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

    Are You a Software Architect?

    The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

    Agile – A Way of Life and Pragmatic Use of Authority

    The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

    Getting Started with Grails, Second Edition

    "Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

    Using ITIL V3 as a Foundation for SOA Governance

    Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

    Adrian Colyer on AspectJ, tc Server and dm Server

    SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

    Adam Wiggins on Heroku

    Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

    SOA as an Architectural Pattern: Best Practices in Software Architecture

    For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.