InfoQ

News

Terracotta improves failover support, adds clustering for 5 more frameworks

Posted by Floyd Marinescu on May 01, 2007

Community
Java
Topics
Clustering & Caching
Tags
Terracotta ,
iBATIS ,
RIFE ,
Lucene
Open source JVM heap-level clustering/replication solution Terracotta released version 2.3 yesterday, adding TCP/IP-based active/passive failover, cluster-membership notification events, and a new pre-configured module system for quick clustering of Tomcat, Weblogic, Spring, Lucene, RIFE, Struts 1, Cglib, and iBatis.  Also, the Jetty founders have been working on clustering Ajax cometd applications, and Wicket leads are enabling Wicket clustering, both with Terracotta. RIFE lead developer Geert Bevin has also been hired by Terracotta recently. VC-backed Terracotta went open source this past December under MPL-based license.  InfoQ spoke to Terracotta CTO Ari Zilka and VP Product Operations Jeff Hartley to find out more. Terracotta is getting about 5000 downloads/month, according to Ari.

Terracotta uses a hub and spoke architecture where the central server to coordinates heap changes across JVMs, pushing field-level changes to each server on an as-needed basis.  The Terracotta "hub" prior to v2.3 was itself clusterable for fault-tolerance using an active/passive solution using shared disk (such as clustered NFS or SAN),  which can be expensive. As of v2.3 Terracotta can cluster via multi-cast cluster of peer 2 peer Terracotta hub-servers (a separate tier from the actual application servers that are being clustered with Terracottta). Ari Zilka explained:
"Previously, the passive would come up and try to acquire the disk lock that the active was holding, the active would hold it until it crashed, then the passive would take over. You could even chain passives in any order.  In 2.3 the definition of the active or passive is not based only who starts first and acquires a lock, it's based on a vote in a peer 2 peer cluster of Terracotta servers. Whoever is voted active becomes the active in an election process, and then evreything that is sent to him via the appserver tier he sends to the other guys multicast. They heartbeat each other and when he dies they all find out and start another election. Any one of the other passives can become the new active.
The other major notable technical addition to v2.3 is the addition of cluster-membership notifications.  According to Jeff Hartley, "if a node joins or leaves a cluster, a developer can make use of this information for example in grid computing type configurations,"  Ari continued: "this is helpful for our own user base which currently runs Terracotta DSO for clustering and then JGroups for membership status, our user community wanted cluster-membership events so they can stop using JGroups and stay pure-Terracotta).

Terracotta’s 2.3 also changes the way Terracotta integrates with other popular frameworks. Rather than having separate distributions of Terracotta for each framework, the single Terracotta downoad now includes "configuration modules" which provide pre-built configurations that customize Spring, Tomcat, and WebLogic, and additionally v2.3 adds pre-built support for Lucene, RIFE, Struts, Cglib, and iBatis for clusterability.   JBoss is also officially supported now.

Explaining Terracotta in the context of other clustering solutions, Ari said:
What we're really introducing is the ability to inject high availability into the JVM, by allowing multiple physical JVMs to appear as one or more logical JVMs. So if you lose any one machine/instance you're not really losing anything it was working on because the other JVMs can seamlessly attach to the memory that JVM was working on. We're high availability at very high scales as opposed to scalability with reasonable guarantees of availability.
Future version of Terracotta will include integrations with Glassfish, Wicket, and other frameworks.  Work on an active-active failover strategy (having multiple active hub servers) is also being worked on for later this year.    See also InfoQ's definitive introduction to Terracotta technical article, as well as Spring Webflow with Terracotta.

No comments

Watch Thread Reply

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.