Access Keys:
Skip to content (Access Key - 0)
(Access Key - l)

Availability

The book is available at Apress.com, Amazon.com, and leading book retailers including Borders and Barnes and Noble.

   
   

Code Samples

The code samples from the book are located in our SVN repository and are available for free download.

http://svn.terracotta.org/svn/forge/projects/thebook/tags

Book Reviews

Here's what people are saying about the book:

"This is a rock-solid book! If you're starting to use Terracotta - absolutely (buy it)."
—Frank Kelly - Softarc

"Frack me! Just finished the Terracotta book and all my remaining questions are answered..and I mean even the obscure stuff. Great book!"
—Holger Hoffstätte via Twitter

"Terracotta has proven over the years to help ease the development of HA systems, that scale from the start...this book has real world examples (not just Hello Worlds! Programs) ..to build and deploy systems backed by Terracotta for your enterprise."
—Jeryl Cook

"'The Definitive Guide' definitely rocks"
—icon__ via Forums

"This book really presents an in-depth coverage of the power of Terracotta, backed by real world how-to examples."
—Felipe Coury

"(The Definitive Guide to Terracotta) is a must for anyone trying to understand and get real performance out of a custom Terracotta deployment."
—Blake D. Dworaczyk

"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."
—Stephan Schmidt - Reposita

"This book goes into a lot of detail about how and why Terracotta was made. It goes into a lot of topics such as scaling, the jvm, synchronization, etc. It talks about the philosophy of Terracotta and goes through in detail about the choices that you have when for example, you have to scale, and the tradeoffs of each of those choices."
—Timothy T. Wee

Clustering the JVM for Spring, Hibernate, and POJO Scalability

Published By Apress

We're pleased to announce the availability of our new book, The Definitive Guide to Terracotta, from Apress, the publisher of the popular Definitive Guide series of technical books.

This book is intended as a guide for developers and architects using Terracotta. It provides detailed explanations of Terracotta's scaling engine, as well as user best-practices, recipes and prepackaged frameworks. Also included in the book are several pragmatic real-world case studies designed to empower readers to build scalable Java applications without the trade-offs between high availability and performance that tend to occur today.

Chapters


1. Theory and Foundation: Forming a Common Understanding

Covers the origins of Terracotta, its architecture, how it honors the Java memory model while delivering high availability, scalability, and performance with fewer trade-offs, and common use cases for Terracotta, such as

  • Replication of user and application session data,
  • Distributed caches,
  • Offloading overburdened databases, and
  • Workload partitioning.

2. The History of Terracotta

Describes how the founders arrived at the concept and architecture of Terracotta. Includes a brief history of Internet and Web based architectures, pros and cons of these architectures, and why the Terracotta solution was created.

3. Jumping Into Terracotta

Hello Clustered World. A distributed version of the classic "Hello World" introductory program, a very simple Java program is distributed using Terracotta.

After running the first "Hello World" application, the basic pieces and parts of Terracotta are described. Includes a tour of the kit, including the Admin Console and more.

4. POJO Clustering

The very basis of Terracotta, clustering POJOs. This chapter goes deep into the technology of Terracotta, describing the core concepts in Terracotta, including:

  • Clustered objects
  • Terracotta roots
  • Distributed Garbage Collection
  • Thread coordination across JVMs
  • Locks (distributed synchronized wait() and notify())
  • Transactions

5. Caching

Shows how to implement distributed caching with Terracotta. Includes tutorials on building your own cache (e.g. making your HashMaps clustered) and using existing OSS frameworks such as EHCache.

6. Hibernate With Terracotta

Describes where and how to use Terracotta to accelerate Hibernate Performance. Covers "detached" Hibernate POJOs and using Terracotta as a 2nd Level Cache. The performance trade-offs of these two approaches are discussed.

7. Extending HTTP Sessions With Terracotta

Demonstrates how to use HTTP Session in place of native clustering (for performance and scale) for popular web servers including:

  • Glassfish
  • JBoss
  • Jetty
  • Tomcat
  • WebLogic
  • WebSphere

8. Clustering Spring

Describes how to inject Terracotta clustering into a Spring application. Terracotta has deep integration with Spring, allowing your application to change a Spring Singleton into a Spring Clustered Singleton. Fire Application Events across the cluster instead of just the JVM, or cluster Spring WebFlow.

A simple Spring application is used to demonstrate these concepts.

9. Integration Modules

This chapter discusses the Terracotta Integration Module (TIM) framework, which allows you to specify sets of clustering configurations as components, and include those components in your own configuration. We will investigate how to use TIMs and how to build them from scratch, which you might do to cluster an external library or framework where you need clustering or when modularizing the clustering configuration of your own application.

10. Thread Coordination

Deep dive on the different ways to use Terracotta to manage coordination of activities (threads) across the cluster.

11. Grid Computing Using Terracotta

A case study in building a framework with Terracotta, this chapter presents the Master/Worker pattern, and demonstrates how to build a framework to implement the pattern.

12. Visualizing Applications

Tuning applications that run in a cluster is hard. What makes tuning difficult is that the application is a logical entity running across processes and machines, while the available tools work almost exclusively at the process or machine level.

That is why Terracotta provides native clusterwide visualization tools. The idea is to stack all the relevant metrics and measurements a developer should be observing for every JVM in a single dashboard view along with the activities of the Terracotta server. Through visualization, we can study an application quite literally as it runs, without building custom tools to do so.

This Chapter will introduce you to the debugging and profiling tools that are included with Terracotta, using a simple application to demonstrate how to identify and resolve common bottlenecks.

Adaptavist Theme Builder (3.2.0) Powered by Atlassian Confluence 2.8.2, the Enterprise Wiki.