Short Book Review on “The Definitive Guide to Terracotta” by Apress

Some small notes: The book was kindly supplied by Apress. The review was lost, tried to be rescued, not found and finally written again from my notes, all because my MacBook crashed 😉

A short review of the Apress Book "The Definitive Guide to Terracotta" by Terracotta Inc.

I didn't do reviews before so this is my first review here. As I'm reading lots and lots of books (currently "Practical API Design" and "Clean Code") I thought it would be good to combine my blogging with the book reading and write some reviews. But I don't know how, so let's try 🙂 Most of the time I do two things with book reviews. First I read the conclusion and the rating, second I have a look at the table of contents. You can do the second here. And the first one in short: Good book.

Slightly longer: If you need or want to know about Terracotta (TC), it's the book to buy. It's written by the Terracotta guys, you can't get better and more accurate information.

For those who are more interested in some details: The book is about a software solution called Terracotta to distribute -transparently- the Java Virtual Machine memory over several JVMs. This leads to some very interesting use cases and new approaches to scalability. Terracotta calls itself virtual heap.

The book starts with a good introduction and motivation to virtual heaps, big heaps spread over several JVMs - not to be confused with distributed caching or clustering POJOs. Both can be done with TC but much more. So the main part of "The Definitive Guide to Terracotta" focuses on use cases. Those are quite good motivated, explained and described with many examples and working code.

Use cases which are covered include:

  • Caching for (web) applications
    • Writing a cache layer yourself with TC
    • Using TC together with ehCache
  • Speeding up Hibernate with distributed caching
    • TC for the second level cache
    • TC for detached instances
  • Distributing sessions over several servers
  • Grid computing
  • Clustering Spring out of the box

All examples are relevant to building todays web applications and easy to follow - more like a cookbook. The authors finish the book with chapters on TC integration modules (TIM) which are drop in replacements into your application for some of the described use cases and scenarios (and more). That part includes using and creating TIMs. At last there is a - rather small chapter on performance optimizations. A good start but I've missed something there.

After some praise now some things I didn't like:

  • Split brain problem which you may run into is not solved, you need to do it yourself over WAN for high availability (with a message bus for example)
  • Chapter about optimizations but not extensive enough and not enough information about deployments and deployment scenarios
  • Minor point: Roadmap on back looks stupid

My conclusion: A rating on 0 to 10 doesn't make sense to me. Either it's a should-buy or not. For Definitive Guide to Terracotta, buy it if you want to evaluate or use Terracotta. Be aware that it's missing some industry stories on deployments and usage.