Ehcache
Measuring Java Object Sizes
0Probably pure coincidence, but I stumbled upon this Estimating Java Object Sizes with Instrumentation blog. Given we just had released Ehcache 2.5 with Automatic Resource Control, aka ARC, I had to read through this. We do, amongst other, use an instance of java.lang.instrument.Instrumentation to measure object sizes ourselves. Yet, we found some shortcomings to that approach:
As the blog mentions, you need an agent to get to that instance. Yet it felt like imposing every Ehcache users wanting to use ARC to add a -javaagent: just wasn’t a More >
Ehcache BeJUG session
0The presentation I gave at the BeJUG a couple of weeks back is now available on parleys.com.Here is part 1:
You can also find the code to the Raffle application I used to demo a couple features on github.com. For more information, downloads and full documentation on ehcache please visit ehcache.org
Ehcache’s Writer API Screencast
1A common pattern to offloading the database is to use a cache in front of it. Yet, generally, it’s still application code that goes to the underlying system of records for writes. It also then becomes responsible for invalidating or updating cached entries.
Using cache writers can not only automate that aspect, but also enables you to scale your writes. This 5 minute screencast explains how to use Ehcache Writer API to achieve this and what it means to your application code: especially in distributed environments when clustering your caches with Terracotta, the contract becomes looser than More >