Over a million developers have joined DZone.
Silver Partner

Ehcache 2.0 Gets More 'Enterprisey' Features

· Java Zone
Today, Terracotta is releasing new versions of Ehcache and the Terracotta infrastructure.  Terracotta's open source products offer enterprise-level capabilities that you might find in a high priced proprietary product like Oracle Coherence.  Today's bundle release, which is appropriately named "Project Darwin", contains Terracotta version 3.2.1, Terracotta Express Web Sessions, and a major new version of Ehcache.  Dzone arranged an interview with Terracotta Product Manager Mike Allen to get the lowdown on all the new features in Ehcache 2.0 and Terracotta Express Web Sessions.

Terracotta Express Web Sessions

Express Web Sessions uses a reference application that Terracotta built with SpringSource's help.  The application (called Examinator) was used for an exam-taking site and it provided session clustering between nodes, a way to cache the data, and a way to map the object model to the database model.  It also showcased many of the advanced features of Terracotta DSO (Distributed Shared Objects).  The new express mode allows users to easily cluster application data through a much more standard configuration that works the same way for Hibernate, web session objects, or a distributed cache.  Users won't have to revert to a Terracotta config file.

Ehcache 2.0

Reduced Complexity - Ehcache 2.0 now supports fully-coherent distributed caching as a Hibernate Second-Level Cache, as well as directly through the Ehcache API, using one common JVM vendor-agnostic .jar file.  A simple configuration change allows you to switch between local and distributed implementations.  Neither Java agents nor boot jars are required.  Allan explains that with Ehcache 2.0, developers don't need to know the underlying complexities of Terracotta (e.g. integrations, locking, instrumentation) to make the platform scale out.  Everything is configured through a single Ehcache interface (ehcache.xml) whereas before there were different sets of instructions for things like Hibernate and web sessions.  "We've basically taken [the small config requirements] and expanded those to the whole suite," said Allen.  Support for OSGi containers is also included, allowing developers to build modular applications with next-generation application servers

JTA - The powerful JTA (Java Transaction API) standard is now supported in Ehcache 2.0.  This enables Ehcache to act as an XA resource in transactions coordinated by a transaction manager alongside other XA resources like databases and message queues.  This means that cache operations can now participate in fully XA compliant transactions.

Data write-behind - The new Ehcache API supports write-behind caching with guaranteed asynchronous batching of updates to the database.  This feature balances and reduces database load while improving application latency.  This feature is especially helpful for caches that are frequently updated (most of them are).  

Fast Loading - The fast loading feature makes bulk-loading really quick and efficient.  The newly optimized bulk-loading in Ehcache 2.0 enables fast cache warming and rapid application start-up.    

Dynamic Cache Config
- Terracotta continues to increase cache visibility and tuning ability to let users of Ehcache know what's going on inside their caches and monitor efficiency.  A new management feature in Ehcache 2.0 provides dynamic configuration for Ehcache, whereby cache parameters such as TTI (time-to-idle) and TTL (time-to-live) can be changed in runtime via the Terracotta management console or any JMX-compliant tool.

Allen also talked about how the Grails framework takes advantage of this new release.  Terracotta's current arsenal of technologies (e.g. Hibernate, Web Sessions, Ehcache, Quartz Job Scheduler) is the same set of default integrations used in Grails.  Getting a Grails application up and running on Terracotta's infrastructure is as simple as it would be for a pure Java application, said Allen, all you have to do is enter: "Terracotta equals 'true'".  Allen says that Terracotta will be watching Grails very carefully - "The wave is coming I think," he said.

Project Darwin is the internal name for the bundle of features that Terracotta just released (Ehcache 2.0 and Terracotta 3.2.1) and the name was retained for public release because the developers consider it to be a major 'evolution'.  Allan said that Terracotta had very positive feedback on the beta.  "These 'enterprisey' features are things that people have been asking about for years," he said.  Until Terracotta acquired Ehcache, the project's founder, Greg Luck, couldn't add all of these features as a one-man-band open source developer.  Allen says that with version 2.0, Terracotta was finally able to bring those "hardcore" enterprise features into Ehcache.  

Allen says that Terracotta's business model remains consistent for all of today's new releases.  "We want massive adoption of this technology, so we're giving it away.  We make our money through enterprise support and a couple of enterprise features."  Those features include additional features for operational environments and unlimited scaling.   Ehcache 2.0 and Terracotta Express Web Sessions are available immediately for download.
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}