|
This document describes why and how you should migrate applications using Terracotta DSO (Distributed Shared Objects) to using the standard Terracotta APIs in a standard (or "express") Terracotta cluster. The main advantages of Terracotta standard clusters over DSO clusters are:
Unlike Terracotta DSO clusters, standard Terracotta clusters use serialization. But with their built-in efficiency and substantial advances in streamlined functionality, standard Terracotta clusters have significantly lower implementation costs, higher performance, and improved stability. Migration TasksThe following sections specify the tasks you may need to perform to migrate from DSO to a standard Terracotta cluster. DistributedCache to EhcacheIf your code used the Terracotta DSO cache known as Distributed Cache, you must switch to using the Ehcache API. Distributed Cache is supported only with DSO. Serializable ObjectsThe standard Terracotta cluster requires all shared objects to be serializable, meaning that all classes must inherit or implement the Serializable interface. Ensure that any object to be shared across Terracotta clients is serializable. The standard installation is tuned to minimize the overhead of serialization. A typical standard Terracotta cluster provides a substantial performance advantage over a DSO cluster because it does not require instrumentation and strict lock and transaction semantics. Update Terracotta ConfigurationBecause classes do not need to be instrumented in a standard Terracotta installation, explicitly specifying TIMs in Terracotta configuration is not necessary. Any frameworks, containers, or other technologies you use with your application can now be integrated without using TIMs. Collections to CachesIf you used DSO to cluster a data structure, such as an ArrayList, to store and manipulate data in memory, you can use Ehcache caches to do the same in a standard Terracotta cluster. If using a cache is not an option, consider using a Clustered Map with the Terracotta Toolkit (see below). Using the Terracotta ToolkitThe Terracotta Toolkit offers easy access to a simple and powerful API for integrating your application with Terracotta technology. Many of the tools used for sharing coherent data in a cluster are available through the Toolkit, including:
More Information on Using Terracotta ProductsSee the product documentation. |
Migrating From Terracotta DSO
(None)