Child pages
  • DSO Data Structures Guide
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

About Terracotta Documentation

This documentation is about Terracotta DSO, an advanced distributed-computing technology aimed at meeting special clustering requirements.

Terracotta products without the overhead and complexity of DSO meet the needs of almost all use cases and clustering requirements. To learn how to migrate from Terracotta DSO to standard Terracotta products, see Migrating From Terracotta DSO. To find documentation on non-DSO (standard) Terracotta products, see Terracotta Documentation. Terracotta release information, such as release notes and platform compatibility, is found in Product Information.

Unknown macro: {div9}
Release: 3.6
Publish Date: November, 2011

Documentation Archive »

Clustered Data Structure Guide

Clustered data structures in Terracotta are functionally equivalent to their non-clustered counterparts. However, there are some performance differences between the different data structures in a clustered context that are important to understand when designing a system. Some of the performance differences are inherent to the design of the data structure; for example, the very different concurrency characteristics of HashMap v. ConcurrentHashMap that play out slightly differently in a clustered context than they do in a non-clustered context. Other performance differences are the result of point-in-time implementation details in the Terracotta core engine.

This guide is intended to provide you with the information you need to make informed decisions about which data structures to use in which context, how to maximize their efficiency, and how to avoid certain pitfalls.

Data Structures

Array Primitives




















Partial Loading Of Clustered Data Structures

Most of the data structures in the java.util and java.util.concurrent packages that are supported by Terracotta are what we call "logically managed" (for more information, see the Concept and Architecture Guide). Logically managed objects in Terracotta are kept up-to-date across JVMs by replaying the method calls made in another JVM. This is done for performance reasons and, in the case of hash-based structures, for correctness. However, because they aren't managed by keeping track of their physical references to other objects, they do not share the same virtual heap mechanism enjoyed by physically managed objects.

Without special support in the Terracotta core, logically managed data structures are loaded in their entirety into a client JVM when they are accessed . In the case of very large data structures, this can lead to a number of application issues:

  • the data structure may take a long time to load from the Terracotta server
  • the data structure may take up too much space in the local JVM heap
  • the data structure may exceed the available JVM heap, leading to OutOfMemoryErrors.
  • No labels