Caching Solutions in Java
10. Open Terracotta
Terracotta works on hub-spoke architecture. Terracotta is used in a clustered environment.
Each application server in the cluster acts as a client node (spoke). Terracotta libraries are installed in the JVM is loaded when each JVM in the cluster is brought up.
Then, there is the terracotta server which acts as the hub. It can be backed up by another terracotta server.
The terracotta server is implemented in Java.
The terracotta server stores objects that are evicted out of each client nodes when the client nodes run low on memory. If the server runs low on memory, objects are passed to disk space on the server.
Terracotta supports distributed cache. It also supports locks on objects in a distributed cache.
Fine grained replications: Terracotta doesn't require the objects in its cache to be serialized and replicates only changes done to the cache across the cluster.
Terracotta provides a view of the statistics of the memory heap of the client/server nodes in the cluster.
Terracotta supports:
- HttpSession Replication
- Distributed Cache
- POJO clustering
Comparisons of the various Cache Solutions
Every application is different, but consider a cache product for the following application:
- UI intensive web-application
- The backend data store is RDBMS
- The web-app is deployed in a clustered environment
Conclusion
Looking at the comparison sheet, the following two options are recommended:
- Jofti
- JBossCache
For a traditional web application that doesn't require HttpSession replication and has traditional serialized objects as data carriers, Jofti appears to be a good solution.
However, for a very high-end application where importance is given to a sophisticated distributed cache with vendor support, JBossCache fits the billReferences
- http://www.opensymphony.com/oscache/
- http://ehcache.sourceforge.net/
- http://www.jofti.com/
- http://jocache.sourceforge.net/
- http://swarmcache.sourceforge.net/
- https://whirlycache.dev.java.net/
- http://jakarta.apache.org
- http://labs.jboss.com/jbosscache/
- http://cache4j.sourceforge.net/
- http://terracotta.org/
About the Author
Aleksey Shevchenko has been working with object-oriented languages for over seven years. For the past four years, he has served as a technical lead and a project manager. Aleksey has been implementing Enterprise IT Solutions for Wall Street and the manufacturing and publishing industries.
Page 5 of 5
This article was originally published on September 20, 2007