Code Monkeyism

Programming is hard by Stephan Schmidt

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.

About the author: Stephan Schmidt is currently a team manager at ImmobilienScout24 in Berlin. Stephan has been working as a head of development and CTO. He has used a lot of different technologies in the last 20 years including Java, Rails and Python. Stephans main field of interest is maintainablity and productivity in software development. Want to know more? All views are only his own.

If you did like this article but you don't want to subscribe to new articles with your reader, you can follow me on Twitter or subscribe to new posts with your email:

Comments

hi there,

their website and blogs make up for lack of industry coverage in the book. I believe that they’re working on their 2nd book.

BR,
~A

Stephan,

Thanks for the review. As one of the authors, it’s great to receive feedback. I agree that the book is light on “industry stories on deployments and usage.” As Anjan described, until we publish a second book or an update to the first edition, we’ve been busy packing our website with just that sort of content.

The most interesting thing we’ve been doing in that regard is a reference implementation of an application that uses Terracotta in a number of different ways. Very soon, we’ll have a fully functional application that you can download and inspect with companion documentation that describes how Terracotta was used and what the benefits are.

Stay tuned.

Cheers,
Orion

stephan

@Orion: Nice to hear about the industry stories.

Looking forward to the application implementation, and I hope for the announced active/active TC setup :-)

Leave a Reply