Last Monday I attended a fascinating Java developer meeting in San Francisco. Orion Letizi, co-founder of Terracotta, gave a demonstration of a way to deliver enterprise-grade scalability and availability using an open-source network-attached memory solution for Java. I have actually never worked with Terracotta before and have only recently become familiar with it through a start-up in Colorado (Gnip) that is using the software.
Letizi made the point that developing enterprise apps that run on server clusters is not easy and current approaches are hard on application developers, demanding on the application infrastructure, and suffer from serious performance and scalability limits.
As he went through the presentation, I realized that the real problem Terracotta is solving is more related to scalability issues and not so much performance issues. After all, what Terracotta does is allow multiple JVMs to share session state over multiple computers. Sure this can be a great thing and allow for great scalability as you add more servers to your infrastructure, but your performance is going to vary by how many additional servers you add. I don’t really see any reason to use Terracotta unless you have a large application which is bound to face the scaling issue one day. Using Terracotta for small apps already using a caching system would only add additional complexity with little or no performance gain. Even in large distributed systems, I’m not sure if there would be a noticeable performance gain.
Again, I have not worked with Terracotta first hand, but it does seem to offer an inexpensive and easy to scale solution for Java applications. I think it would be much simpler to implement Terracotta rather than using custom application code and databases to share data in a cluster. I am definitely going to give this open source tool a try.
Today, on the second day of Silicon Valley Code Camp 2008, I spoke to a Java *expert* who worked at Sun Microsystems for about 15 years and now works at Azul Systems. Azul provides enterprise server appliances for optimal Java performance. They even have a monster server composed of 864 cpu cores and 768 GB of memory.
Anyway, this person confirmed my view that Terracotta is a tool for scaling Java applications and not for improving application performance. In fact, I was told that it may make performance slightly slower at the cost of providing better scalability.
This should not deter anyone from using Terracotta. The price paid is small compared to the benefits. Most likely the performance will be as comparable as before with better scalability. Of course you could buy the 864 cpu beast by Azul to resolve all your performance and scalability issues, but that will probably set you back enough to sell a couple body organs. I was told there is a much less powerful test version available at the low price of only $40,000. Take your pick…..I think I’ll try Terracotta.