Archive for the ‘Ehcache’ Category

Catch me at JUGs/SIGs in Brisbane, San Francisco, Philadelphia, New York and Atlanta

Tuesday, February 9th, 2010

I am doing some JUGs and a SIG in the US the first two weeks of March. And a JUG next Monday in Brisbane, Australia.

The topics will vary from JUG to JUG but will have for most JUGs:

  • Demo: How to configure Pet Clinic for use with Ehcache standalone and Ehcache EX with Terracotta Server Array
  • Tuning tips
  • Ehcache 2.0 new and notable
  • Demo: Ehcache Monitor preview

Here are the JUG details:

  • Date: Monday 15 February 2010
  • Time: 6:00-7:30 pm
  • Location: Toowong Library, Brisbane
  • Event: Queensland Java Users Group
  • Speaker: Greg Luck and Paul O’Keefe


  • Date: 2 March 2010
  • Time: 6:30-9:00 pm
  • Location: 650 Townsend Street, San Francisco, CA 94107
  • Event: The San Francisco Java User Group Special Event
  • Speaker: Greg Luck
  • URL: [http://www.sfjava.org/calendar/12432040/]


  • Date: 3 March 2010
  • Time: 7:00-9:00 pm
  • Location: The Omnicare Building, 630 Allendale Rd, King of Prussia PA 19406
  • Event: Philly JUG
  • Speaker: Greg Luck
  • URL: [http://phillyjug.jsync.com/]


  • Date: 4 March 2010
  • Time: 6:30-9:30 pm
  • Location: Liquidnet Inc, 498 Seventh Avenue, 15th floor, New York, NY 10018
  • Event: NY Java SIG
  • Agenda: Ehcache in the Cloud
  • Speaker: Greg Luck
  • URL: [http://www.nyjavasig.com/]


  • Date: 8 March – 9 March 2010
  • Time: 8am to 6pm and 8 am to 4pm
  • Location: Cobb Galleria Centre, Two Galleria Parkway, Atlanta, Georgia 30339
  • Event: DevNexus Atlanta
  • Speaker: Greg Luck
  • URL: [http://www.devnexus.com/]
  • Date: 11 March 2010
  • Time: 6:30-9:30 pm
  • Location: 650 Townsend Street, San Francisco, CA 94107
  • Event: The San Francisco Java User Group Special Event
  • URL: [http://www.sdforum.org/]

Sign up for a Webcast I am giving 3 February: Boost application performance and monitoring with Terracotta Ehcache

Friday, January 29th, 2010

I am giving a webcast next week. There is lots going on with Ehcache right now with new features. We have some impressive numbers to show off too.

In this webcast learn how to use Terracotta Ehcache to get dramatically boost application performance. Terracotta Ehcache provides a high performance Hibernate second level cache that boosts application performance as much as 10x.

Understanding performance behavior specific to your application can be a challenging task. Every application workload is unique. To provide reliable metrics for comparison, Terracotta Ehcache has benchmarked the Spring PetClinic reference application against competitive solutions such as Memcached, Commercial IMDG, My SQL and a leading In Memory Data Grid including the impressive performance increases from the latest Terracotta 3.2 Server Array.

Sign up here: https://terracotta.webex.com/terracotta/onstage/g.php?t=a&d=661974937

How to contribute to Ehcache

Wednesday, January 20th, 2010

The ehcache community is large and very active. People come up with great ideas to solve problems they come up against and often contribute patches to ehcache. The Ehcache project has always encouraged contribution of patches.

If you are submitting a patch, please complete a Contributor Agreement. This ensures that we can accept the patch and make it available under our Apache 2 open source license. You can grab the agreement form and instructions on where to send it once completed from the Community Wiki Contributor Page: http://www.terracotta.org/confluence/display/devdocs/How+To+Become+A+Contributor

Finally if you have submitted a patch which has not yet been applied, we may be waiting for you to complete an agreement.

11 January 2010: ehcache-1.8, ehcache-core-1.7.2 and ehcache-terracotta-1.8

Tuesday, January 12th, 2010

This is a final GA release of ehcache comprising ehcache, ehcache-core and ehcache-terracotta modules.

This release contains some bug fixes to ehcache-core, but the notable change is the upgrade of the ehcache-terracotta module to support Terracotta 3.2. Terracotta 3.2 is dramatically faster than 3.1. See the changelog for complete details of ehcache-core changes.

Note: If you experience different caching ergonomics you can enable the LinkedHashMap based engine with java -Dnet.sf.ehcache.use.classic.lru=true. This is the engine enabled up to 1.5.

Ehcache Monitor Beta 2 released

Tuesday, December 15th, 2009

We have had hundreds of people sign up for an play with beta 1 of the Ehcache Monitor. We have fixed over 15 bugs in Beta 1 and have released Beta 2. We have also created a roadmap for beta 3 which will add significant new features. See Ehcache Monitor Beta.

Ehcache Web 2.0 released

Sunday, December 13th, 2009

Ehcache Web has been part of Ehcache for years. In this release the web caching is split into its own module. The web module provides a filter based PageCachingFilter and PageFragmentCachingFilter which can be used with any Java web framework for caching of HTML, SOAP, REST, JSON, XML and other types.

New in this release is integration with ehcache-terracotta 1.7.1 and higher, so that coherent, terabyte scale web caches can be created.

See ehcache-web.

Ehcache welcomes Grails as a first-class supported framework

Wednesday, December 9th, 2009

The Ehcache project is happy to welcome Grails to the fold. The new Grails 1.2RC1 uses Ehcache as the default Hibernate second level cache. We worked with the Grails community to test Ehcache with Grails to ensure a good developer experience. As part of that we have added a new Grails Chapter to the Ehcache documentation on how to configure Ehcache for Grails, including production tuning.

We plan further enhancements to Ehcache to roll in the Terracotta Hibernate provider so that Grails users can experience the Terracotta Scale Continuum by simply making config changes in ehcache.xml.

Note that earlier versions of Grails also ship with the Ehcache library and it very quick and easy to configure it. See the documentation.

New 1.7.1 GA release – ehcache, ehcache-core and ehcache-terracotta

Monday, November 30th, 2009

This is a final GA release of ehcache-1.7.1 comprising ehcache, ehcache-core and ehcache-terracotta modules.

This release contains 15 fixes and improvements over 1.7.0. See the changelog for complete details. Downloads and Maven modules are available here.

Very significantly, this release will enable new GA releases of the other ehcache modules, such as ehcache-web, which we expect to release over the next few weeks.

Note: If you experience different caching ergonomics you can enable the LinkedHashMap based engine with java -Dnet.sf.ehcache.use.classic.lru=true. This is the engine enabled up to 1.5.

It’s Thanksgiving: Here is what we have been cooking up for Ehcache

Friday, November 27th, 2009

I am over in the US through to Christmas and enjoying my second only Thanksgiving here. It has put me in a reflective mood. We have been hard at work on Ehcache over the last few months and I want to give everyone an update on some cool stuff coming out soon.

Ehcache-1.7.1

1.7.1 contains 15 bug fixes and improvements. That is quite a lot for an ehcache release, but reflects some serious time put in by the Terracotta Transparency Engineering Team, together with the impact of the large changes made in 1.7.0 when we integrated with Terracotta.

The biggest thing is that 1.7.1 is ready for some serious business. Start with local caching, and choose from Terracotta open source, RMI, JGroups or JMS for clustering and replication. RMI and JGroups work well up to around 20 nodes, and up to as much data as you can comfortably deal with in your local node, around 5GB in memory and more if you overflow to disk. If you need more than that, or your need coherence, or you need 99.99+ then plugin in Terracotta. This last one costs money, but it is worth it and cheaper and better than the competition. With that solution you can scale as far as you want. Literally. In the new year I plan on showing how to take this to a 1 Terabyte coherent cache with 99.999% availability and class-leading performance.  In the marchitecture, we call this the Scale Continuum, because that is what it is.

The other really big thing is that 1.7.1 completes the modularisation that was started over a year ago. The other ehcache modules will all have new releases, many of these the first non-beta releases as modules, in the next few weeks.

Google App Engine

Back in June I made some tweaks to support Ehcache in Google App Engine. At the time I suggested how this could be used with JCache and Google’s cache infrastructure. Because of GAEs restrictions, it did not include CacheLoaders. In 1.7.1 CacheLoaders have been changed to support GAE. And now, with a contribution from Cedric Lime, the ehcache-googleappengine module has been created. That one is fully integrated. It uses Ehcache as a high performance in-process L1 cache and GAE’s cache infrastructure as an L2. Why is this cool? Ehcache is 3 orders of magnitude faster. This means your apps will be faster, will do far less network calls to the cache infrastructure and will cost you a lot less in data and CPU charges. And you can build your apps as you are used to

Grails becomes a first-class citizen

I am a big fan of Grails, as are my Terracotta colleagues. Ari Zilka, Terracotta CTO,  ran into Graeme Rocher, the maintainer, a few weeks ago at SpringOne, and we thought it was high time  we offer Grails first class support. With that in mind I have been working with Graeme, testing Ehcache 1.5, which is already included in Grails-1.1.1, but is not active by default. It all works great. There will be a new Grails chapter (yes, this is the link, but I have not quite put it up) in the Ehcache documentation on Grails, showing step by step how to get up and running with Ehcache and Grails in about two minutes, with a couple of config line changes. Of course, with ehcache-1.7.1, this means that the Grails is a first-class citizen and can use our technology to scale up to massive apps.

Coming in early 2010: a new unified Hibernate Caching Provider

Ehcache of course started life as the “Easy Hibernate Cache”, thus ehcache and we remain committed to being the very best Hibernate caching provider. Now just prior to Ehcache joining Terracotta, Terracotta released a killer provider. As well as integrating with Terracotta clustering, it uses bytecode manipulation to remove syncrhonization required by caching providers (not Ehcache) and screams. Now that we have two providers, and Ehcache is already integrated with Terracotta via the ehcache-terracotta module, we plan to simplify everyone’s lives and unify the two by making a new ehcache provider which will work with ehcache but also with Terracotta.

OpenJPA becomes a first-class citizen

With JPA 2 about to make it out the door, a lot of folks have been playing with JPA by using Hibernate through it, or by using DataNucleus in GAE (at least I have). Earlier this year Craig Andrews contributed a patch for OpenJPA. That was released a few months back as the ehcache-openjpa module 0.1. In the best open source tradition the idea was to release it and get feedback. Now, we have that feedback, including from OpenJPA lead Kevin Sutter, and we have been readying 0.2. Once again, as with the OpenJPA ehcache provider can take you all the way along the scale continuum. We should have this released in the next week.

Ehcache DX Monitoring and Management

A few months ago I used the MySQL Enterprise Monitor. It turned out to be very useful to debug a gnarly problem we were having. It got me thinking that Ehcache could do with its own monitor for the same reason. Given that it would need to collect data from each CacheManager in your enterprise, and that most operations monitoring tools charge per monitor, an Ehcache Monitor would also provide a cheap and convenient consolidation point for integration with those tools. Now, at Terracotta, we think that caching should be a first-class component of your architecture, and therefore it needs first-class tools.

A few weeks ago we put out our first beta of this product and have been getting feedback. With the first cut working I have been thinking the past few weeks that I need to instil my knowledge of every caching issue I have ever had to investigate, and all the ones I have helped others with, into this tool. In other words, give it the secret sauce. In my opinion this will make the tool invaluable for production Ehcache environments.

Here is a peek at what is getting added into the next cut:

  1. Simplified SLA monitoring, using our HTTP interface
  2. Statistics switchable between instantaneous and cumulative
  3. A week or two’s history, for comparative analysis, and for finding the dreaded issues in your new application release
  4. Graphing of numerous Cache Efficiency statistics
  5. Graphing of Full GC and other GC events. Why? Because this is critical for apps with large heaps, which caching apps have
  6. Graphing of actual and projected memory use for each Cache. Wow! This one will be great.
  7. Clear a cache in all nodes across the whole enterprise with one click.  (This one would have been useful )

Ok, so those are features, but how will that work on the ground. Well, I have been thinking about that and here is just one use case.

A new system is put into production with Ehcache. After 3 months, the users notice that the system is getting slow. Operations sets up SLA-alerts on page response time which immediately fail. They then set up alerts on average get time of 100 ms on any cache in the app’s main cachemanager – which immediately fails. 2nd level support is contacted. The av get time graph for a series of caches are reviewed. com.company.process.domain.Country cache shows a get time of 300ms. The graph history which goes back 2 weeks shows that it jumped a week ago and a week and a half ago. The config on the config tab is checked and it is noted that the max elements in memory is set to 50. The statistics tab shows that there are 50 elements in memory and 2 on disk. The memory consumption tab shows that used cache memory equals max predicted memory for the cache. The 2nd level support checks with apps administrators and discover that the system has been rolled out to more countries and is now at 52, with more coming. Solution: up the maxElementsInMemory to > 52.

To get involved in helping us shape the Monitor, you can download the first cut here. If you do, ping us with your feedback and we will incorporate it in the next cut which we will be starting work on in the next week.

Anyway, as everyone can see, I have been up to a few things since I started working on Ehcache full-time a month ago. Look out for next year!

Ehcache Webcast Wednesday 4 November at 11am PDT (San Francisco Time)

Thursday, October 22nd, 2009

In this webcast, Greg Luck, the maintainer of Ehcache and CTO Ehcache at Terracotta, Inc. will show you how simple it is to scale applications using new Ehcache-1.7 clustered with Terracotta 3.1.1, both components of the Terracotta for Caching product line. Anyone using ehcache will be interested in the new possibilities offered by Ehcache+Terracotta.

He will walk through a demo application which uses standalone ehcache and show how, with a few config line changes in ehcache.xml, the Terracotta Server Array for coherent distributed caching can be plugged in.

He will then take the Terracotta Developer Console, which now supports Ehcache, for a spin and show how to visualise and profile your application in real-time. Finally, he will demonstrate how to add automatic partitioning, capacity on demand, durability and guaranteed write-behind updates.

Hundreds of thousands of deployments depend for their performance today on Ehcache, the reference implementation for JSR107, and some of the largest companies in the world rely on the enterprise scale of Terracotta. Now, you can have the best of both worlds with no code changes.

The Terracotta for Caching product line is available immediately. All three versions incorporate the Ehcache API. They include:

  1. Ehcache DX – High-performance Ehcache standalone and peer-to-peer replicated cache with enterprise support, monitoring, management and visualization;
  2. Ehcache EX – The same industry-standard high performance Ehcache running on the award-winning Terracotta Server Array for high throughput, scalable distributed cache applications with guaranteed data coherence, along with high availability, enterprise support, monitoring, management and visualization;
  3. Ehcache FX – Distributed cache infrastructure software for massive scale; it incorporates the industry-standard Ehcache API and high throughput Terracotta Server Array with data striping to partition cache data for extreme scale, and includes enterprise support, monitoring, management, and visualization.

Register here.