Narrowing the focus
Terracotta is a platform for sharing clustered Java heap. There are many amazing things you can do with it. Too many, in fact. That has sometimes made it hard for me to describe to others why Terracotta is useful – it’s hard for me not to either dive into the details or to go wide and try to describe all possible uses. Luckily, Terracotta usage has expanded quickly enough that we now have a tremendous amount of real data about how people are using it. We can analyze that data to find the sweet spots where Terracotta capabilities are a perfect or almost-perfect match for the problem space.
As a company, we are embarking on a strategic process to focus on a sweet spot, perfect it, and repeat. The goal is to make users in the sweet spot insanely happy and successful. Our starting methodology for doing this is to develop a series of reference applications that we believe are representative of the sweet spots where Terracotta rocks.
We’ll make the reference apps available but more importantly, we will gain some experience in using Terracotta to build semi-real apps. We intend not just to design and build this system, but also to scale it and operate it in production. We will use this experience to distill the design patterns and best practices for using Terracotta in that scenario and provide that material on our web site. We will also flush out any bugs or usability issues and fix them along the way.
The first kind of application we’re going to focus on we refer to as a “user session” use case. This use case involves an application that has some conversational state keyed by user. This state must be available across the application cluster and coherent, yet is not long-term state – it is valid for some period of time (determined by application constraints or session times) and after that can be thrown away.
This is a sweet spot for Terracotta as we are pretty much a perfect match for the requirements. We can provide a transparent API (just write your domain layer like it’s being stored in memory), but still provide availability (by sharing and persisting it), and coherency (due to our implementation under existing Java constructs like synchronization). Using Terracotta for this kind of scenario is a great way to avoid storing and managing that temporary data in your database or clustering for availability through heavier serialization-based mechanisms.
Our first reference application will be an online test-taking application. We will allow users to select and take different multiple choice tests. The “user session” data in this case is the exam data while the test is being taken. The state of the exam needs to be managed but really only the final results need to be stored in a system of record like a database.
We’re still working out the technology stack we’ll be using but the goal is to focus on technologies our customers are already using – Tomcat, Ehcache, Hibernate, etc. I hope to be doing some blogging on our progress as we go.

Hi! My name is Alex Miller and I live in St. Louis. I write code for a living and currently work for
I’d be interested to see what happens when you upgrade your servers, i.e. do all of the current users have to start over?
Yep, exactly the kind of stuff we want to have more experience with.
I think the answer above depends on whether you are upgrading your app or Terracotta itself. With your own app, you can roll the upgrade through (assuming your shared data structures are not evolving much) without ever having a loss of service.
Upgrading Terracotta versions generally requires a full shutdown although there are some ways to partition your servers to even do that without a loss of service.
To clarify on upgrades, the goal is 100% uptime during any upgrade.
As Alex mentions, most app upgrades can be done easily today. Some particular types can present some difficult issues, but we have solutions for those – just not implemented yet. Since those kinds of upgrades are less common, we haven’t focused on building features to support those particular types of upgrades.
For Terracotta upgrades, the same is true. There are no fundamental or architectural issues at play here, we just haven’t to date focused on upward compatibility. There aren’t any real major technical issues, other than it is something we will focus on when we have to – for now we are highly focused on the other parts of the user experience(s) as Alex mentions.
A Grails app for the web stack? Would be cool :-)
I’d be interested in seeing how this would be configured and be working.
@Guillaume: Yep, that would be cool. However, at the moment I believe the majority of our customers are using something other than Grails. I’ll let you work on that!
Once we have the reference app out there, it should provide a significant infrastructure that people could use to rebuild the app with other web technologies if desired.
@Guillame – we definitely do have a some interest in Grails.
Is there anything you or your community can do here – we would be more than happy to help out on an app that someone else owned but as Alex mentions, right now that wouldn’t be our focus.