Question

I want to use CloudFoundry as the PaaS for my Spring/Hibernate application.

I am considering using EhCache as a cache manager but I am worried it won't be able to replicate and/or integrate well with the cloudfoundry environment...

Can a cloudfoundry expert kick in and provide advice or alternative solutions to ehcache?

Was it helpful?

Solution

EhCache replication could be tricky, especially when you bring up on the fly new application nodes in your cloudfoundry cluster (bootstrapping and/or race condition)

One thought: Have you looked at distributed caching instead of replicated caching? EhCache can be "distributed" using what's called the Terracotta Server Array, and all cache consistency needs across the cluster are taken care for you automatically. More at http://terracotta.org/products/bigmemorymax. The advantage would be that when you bring up a new application node on the fly, it would seamlessly connect to the terracotta array (think about it as a sort of in-memory database for caches) and join the distributed caching environment (no bootstrapping or race condition issues)

And within a cloudfoundry environment, the terracotta server array would be considered an external service (like an oracle database would for example). More on that at http://docs.cloudfoundry.com/docs/running/architecture/services/service-connector.html (replace "oracle" with terracotta server array)

Hope that gives you a different perspective if you hadn't looked at that already.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top