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.
|