Dashboard > Terracotta Public Wiki > Home > FAQ
  Terracotta Public Wiki Log In   View a printable version of the current page.  
  FAQ
Added by Orion Letizi, last edited by Bill Sengstacken on Jun 23, 2008  (view change)
Labels: 
(None)

Did this FAQ help you? If not, post your question here.

Email Address:
Message:

Terracotta FAQ

General FAQ

Q: Where can I get Terracotta Enterprise Edition (certified release) software?

A: You can request information here.

Q: Is there any difference in functionality between Terracotta open source software and Terracotta Enterprise Edition software?

A: There is no difference in functionality. The only difference is the Terracotta Enterprise Edition is included with industry leading technical support, certified software patches and updates, and support tools. Terracotta Enterprise Edition also includes a license key manager to help facilitate managing software compliance.

Q: What's your license?

A: The Terracotta Public License, which is the Mozilla Public License, version 1.1, with a few minor changes to make it specific to Terracotta, including an attribution requirement. For more details please see the Licensing FAQ section.

Q: How do I get pricing for subscription support?

A: Please provide us with your contact information here and we will contact you within one business day.

Q: How do I get pricing for training?

A: Please provide us with your contact information here and we will contact you within one business day.

Why does Terracotta not support feature X?

A: Terracotta is an open-source project. It supports most of the JDK, as well as many popular open-source frameworks, application servers and projects. We are always working support more, but Java is a big place, and we have to prioritize what we work on.

If Terracotta does not currently support something you would like to use, here is what you can do:

  • Contribute a patch. Open-source happens because of you. Please see How To Contribute to see how you can improve Terracotta.
  • File a JIRA. If you would like to see a feature added, or have found a bug, we track everything through JIRA.
  • Vote on a JIRA. If there is already a JIRA filed, you can vote for it. We review all JIRA's at the start of every release, JIRA's with more votes get more consideration.
  • Post a message on the respective forum group. If the feature you are looking for is support for a particular framework (such as Wicket, Spring, Hibernate, EHCache etc) then you should also post a message on their forums. This helps the members of those projects to be aware of the demand for supporting Terracotta.

Product FAQ

For troubleshooting tips, check out the Troubleshooting Guide

General Concepts

Q: What is the best way to get started with Terracotta software?

A: The best way to get started is to start with the tutorial, run the sample demo's and then review the documentation.

Q: Which application stacks does Terracotta support? What platforms does Terracotta run on?

A: Please see the Integrations documentation for the status of Terracotta integrations with other technologies.

Supported platforms are also listed in the documentation: Platform Support.

Q: Are you a JVM?

A: We are not a JVM. Terracotta is made up of two parts: library software for your JVM and a separate software server. The software server is typically deployed in a separate jvm process. At the application level, our software libraries plug in to existing off the shelf application servers and JVM's, like Sun Hotspot & Tomcat.

Q: What is the Terracotta Client?

A: The Terracotta Client is a Java library that operates inside your JVM and injects runtime clustering behavior into the classes you specify. When your JVM starts, the Terracotta Client automatically connects to the Terracotta Server to engage the clustering services such as the lock manager, object manager, and memory manager.

more »

Q: What is the Terracotta Server used for?

A: The Terracotta Server coordinates shared objects among all the associated Terracotta Clients; it also stores a copy of the current state of every shared object and writes associated changes to disk.

more »

Q: Do you use byte code instrumentation?

A: We utilize byte code instrumentation to weave functionality into your application at runtime.

Q: Does Terracotta work in App Servers?

A: Yes. Please see the Integrations documentation for the status of Terracotta integrations with application servers.

Clustered Objects

Q: What is a "root"?

A: A root is a connection between a field and a tree of objects. When a field in a class is marked as a root, it and all of its references become shared across all client applications that reference that root.

more »

Q: What is a "managed object" or "shared object"?

A: A "managed object" or "shared object" is any object that has yet to be garbage collected by the Terracotta garbage collector in the Terracotta Server.

more »

Q: Is the environment garbage collected?

A: Yes. We have a full distributed garbage collector.
more »

Q: What will happen if I remove an object from a shared root? Is it still shared?

A: Yes. Once an object becomes shared, it is always shared until it is garbage collected by the Terracotta distributed garbage collector.
more »

Q: When is an object eligible for garbage collection by the Terracotta distributed garbage collector?

A: When it is not reachable by reference from any root and there are no references to it in any client JVM (i.e., the object has been garbage collected from every client JVM).

more »

Q: What will happen if I remove an object from a shared root and then add it again?

A: Everything will work just fine.

Q: Can I make fields transient?

A: Yes. For more information on field transience in Terracotta, see the Concept and Architecture Guide

Q: Can an object be referenced by more than one root?

A: Yes.

Q: Can a shared object be referenced by non-shared objects?

A: Yes.

Q: Will changes to shared objects made by non-shared objects be visible to the cluster?

A: Yes, provided that the class of the non-shared object has been instrumented with our bytecode instrumentation and the changes were made under a clustered lock.

more about changes and locks »

Q: Are all my objects in every client?

A: Not necessarily. We dynamically swap partial trees of objects in and out of the client JVMs and from the Terracotta Server to the disk.

more »

Q: Do all changes get sent to every client?

A: No. Clients only receive changes for objects that they currently have in memory.

Clustered Locks

Q: What is a "lock"?

A: Just like in a regular multi-threaded Java application, a lock serves as a memory boundary and a critical (protected) region. In DSO, the batch of changes made in a lock are applied transactionally to the cluster. Note that Terracotta locks can do more than the exclusive locking that the JVM is capable of on its own.

more »

Q: Can I nest locks?

A: Yes, though you must be careful to avoid lock upgrades. Also, nesting concurrent locks is not currently supported.

more »

Q: How do locks work - what guarantees of data coherency do I have?

A: In general, locks behave the same way as the Java Memory Model. At the beginning of a lock boundary, you are guaranteed to read the fields of an object in a consistent state. For more details, see this Lock Sequence Diagram.

more »

Q: How can I start or stop transaction boundaries independent of code paths? (aka synchronized is not good enough, what can I do?)

A: You can use Java 1.5's ReentrantReadWriteLock. Example:

int foo = 0;
int bar = 0;
ReentrantReadWriteLock lock = new ReentrantReadWriteLock();

public void incrementFoo()
{
    foo++;
}

public void increment()
{
    bar++;
}

public void startSession()
{
    lock.writeLock().lock();
}

public void endSession()
{
    lock.writeLock().unlock();
}

Designing and Developing for Clustering

Q: How do I do listener style notifications for GUIs?

A: We have distributed method calls for just this reason. Take a look at the Shared Graphics Editor sample applicaton to get a feel for how to use them for this purpose.

Running and Tuning Your Application With Terracotta

Q: How do I start my application using Terracotta DSO?

A: In your installation 'bin' directory there is a 'dso-java' script. This script can be used exactly like your regular 'java' executable. It puts the necessary DSO start-up information in your command line. Or, you can add the necessary DSO start-up information in your command line.

Q: Can I tell what locks have been created?

A: While developing your application you can find out about all the locks that were created by setting /tc-config/clients/dso/debugging/instrumentation-logging/locks to 'true' in your tc-config.xml file. (The logging can be controlled at a finer level; see the reference config under config-sample/tc-config-reference.xml.) The output shows up in your terracotta-l1.log file.

Q: Can I tell what roots have been created?

A: While developing your application you can find out about all the roots that were created by setting /tc-config/clients/dso/debugging/instrumentation-logging/roots to 'true' in your tc-config.xml file. (The logging can be controlled at a finer level; see the reference config under config-sample/tc-config-reference.xml.). The output shows up in your terracotta-l1.log file.

Q: Can I see the entering and exiting of locks in my Terracotta Client?

A: Yes. While developing your application you can see lock acquires and releases by turning on runtime logging. This is done by setting the /tc-config/clients/dso/debugging/runtime-logging/lock-debug to 'true' in your tc-config.xml file. (The logging can be controlled at a finer level; see the reference config under config-sample/tc-config-reference.xml.) The output shows up in your terracotta-l1.log file.

Q: What transactionality guarantees does Terracotta provide?

A: In DSO, the batch of changes made to the clustered object graph within the boundaries of a lock (begin/end of a "synchronized" block of java code, ReentrantReadWriteLock lock(), OR begin/end of a cluster-wide "named-lock") are replicated (to the Terracotta-Server and other nodes in the cluster which have a reference to that object) either in an Asynchronous or Synchronous mode. Terracotta DSO passes the classic ACID (Atomic, Consistent, Isolated, Durable) test. DSO does not support semantics of an external transaction manager such as JTA or Spring JdoTransactionManager. There is no notion of a "rollback" in the Java-heap, if a transaction fails. DSO could define a non-natural-Java behavior here, but wants to hear from the community before implementing road-map features around this.

Q: How can I reduce contention?

A: Lock on fine-grained objects as much as possible. Use our variety of lock types (write, concurrent, read) where appropriate to avoid contention.

Q: Why do all of my objects disappear when I restart the server?

A: If you are not running the server in persistent mode, the server will remove the object data when it restarts. If you want object data to persist across server restarts, run the server in persistent mode.

Q: How do I enable persistent mode?

In the servers section of your config.xml, add the following lines:

<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>

See the 'persistence' section of the Configuration Guide and Reference for more details.

Q: Why are old objects still there when I restart the server?

A: If you are running the server in persistent mode, the server keeps the object data across restarts. If you want objects to disappear when you restart the server you can either run in non-persistent mode or remove the data files from disk before you restart the server. See the 'persistence' and 'data' sections of the Configuration Guide and Reference

What are semantics associated with the Concurrent Lock ?

A Concurrent Lock in Terracotta defines a transaction boundary but gives no visibility or correctness guarantees.
There is no conversation with the Terracotta server - but the "Terracotta transaction" begins when the concurrent lock is acquired and ends when the concurrent lock is released and all mutations within are batched and committed to the Terracotta server. So with a concurrent lock, 2 threads could read or write to a shared object graph concurrently (i.e no correctness guarantees)

Defining no lock implies GETS/READS might work but there is no guarantee of correctness (in that one might be able to get stale or partially committed data) - but then you would not be able to write to it. With Concurrent Lock in place, GET/READS/WRITES can all work with no guarantees around correctness.

Terracotta and Other Technologies

Q: Can I substitute Terracotta for JMS? How do you do messaging in Terracotta?

A: We don't advocate replacing JMS with Terracotta, although it is possible to easily create message queues using Terracotta with a simple data structure like java.util.concurrent.LinkedBlockingQueue.

Q: Does Terracotta cluster Hibernate?

A: Terracotta supports 2nd Level Cache clustering (using EHCache) and also clustering of POJOs data created by Hibernate. For more information on this subject, see the

Q: What other technologies does Terracotta work with?

A: Look at our Integrations documentation for a full list of technologies that Terracotta is known to work with and the status of our integration with technologies that we don't work with yet. If you don't see something on that list that you are interested in, please contact us.

Support FAQ

Q: How do I open a support ticket?

A: Terracotta customers may either call/email our support line or log-in to our support portal to report an issue. Or you can report a support issue through Terracotta's community issue tracking system.

Q: Is there a single document that describes the Terracotta deployment from start to finish?

A: Yes. Check the Documentation section - in particular the Deployment Guide would be suitable for this need.

Q: Do you offer Support?

A: Yes. We do offer subscriptions - both 5x12 (Monday-Friday 6am-6pm, PST) and 7x24. Please check our Support page for more details.

Q: Do you offer professional services?

A: Yes. We have a team of services engineers who have deep expertise with the Terracotta Products, Enterprise Java development and deploying large scale java applications. Please check our Services page for more details.

Q: Do you have a network of consulting partners?

A: Yes, you may contact any of our open source consulting partners. Please check our Partners page for more details.

Q: Can I get training on Terracotta products?

A: We offer custom training on site and have a schedule of 2-day training courses in various cities in the Americas, Europe and Asia. Please check our Training page for more details.

Q: What kind of support options do you provide for ISV's?

A: We offer a 7x24 custom support option for our ISV partners. Each support offering is customized to meet the ISV current and future support needs. For more information, please contact info@terracotta.org

Licensing FAQ

This FAQ provides answers to commonly asked questions related to the Terracotta Public License ("TPL"). It is provided for informational purposes only. It is not part of, nor does it modify, amend, or supplement the terms of the TPL. The TPL is a legal agreement that governs the rights granted with respect to material licensed under it, so please read it carefully. If there is any conflict between this FAQ and the TPL, the terms of the TPL shall govern. This FAQ should not be regarded as legal advice. If you need legal advice, you should contact your own attorney.

Guaranteed Rights: The Things Everyone Can Always Do Under the Terracotta Public License

Whether you're using Terracotta for yourself or your enterprise, or you're using Terracotta to build software for someone else's enterprise, you can always:

  • run Terracotta for free
  • distribute Terracotta for free
  • implement and integrate Terracotta with other programs
  • fix bugs
  • build new programs
  • share contributions

Using Terracotta for Yourself or Your Enterprise

If you're using Terracotta in either its original or modified form for yourself, or for your enterprise, then you can always:

  • run Terracotta in your enterprise, with no attribution
  • modify and edit Terracotta code, and deploy it without attribution
  • use Terracotta code taken from another product that uses Terracotta, with no attribution

Using Terracotta Within Your Enterprise to Benefit Others Who Are Outside Your Enterprise

Many developers use Terracotta within their enterprise, in a way that benefits users who are outside their enterprise. For example, Google can run Terracotta internally, to benefit users who visit its site. Similarly, an ASP can cluster its application service with Terracotta, to provide a better experience to its users. In these cases, you can always:

  • run Terracotta in your enterprise, with no attribution
  • modify and edit Terracotta code, and deploy it without attribution
  • use Terracotta code taken from another product that uses Terracotta, with no attribution

Distributing Terracotta to Others, Outside Your Enterprise

If you're going to distribute Terracotta in either its original or modified form to someone else, outside your enterprise, then you can always:

  • use Terracotta code in its original form in your software, as long as you include attribution and you license the Terracotta files under the TPL
  • modify and edit Terracotta code and use it in your software, as long as the changes are licensed under the TPL
  • license your own code under a license that you choose, including a proprietary license

Specific Questions

Q: I'd like to integrate Terracotta with my own software and distribute it. Can I do that under the TPL?

A: Yes, you can integrate Terracotta with your own code, but if you want to redistribute your resulting product, you'll need to redistribute the original Terracotta files that you used and any modifications that you make to them in open-source form under the TPL. This ensures that your modifications get licensed back to the community. You can distribute your own code under any license that you choose, including a proprietary license.

Q: Does the attribution requirement apply if I don't make changes to Terracotta code?

A: Yes. The attribution requirement applies to any distribution of Terracotta code, even if it is unchanged.

Q: Does the attribution requirement apply if I only distribute changes to the Terracotta code?

A: Yes. The attribution requirement applies to any distribution of Terracotta code, even if you're just distributing modifications.

Q: I'd like to use Terracotta code in my software and then distribute it, but I don't like the attribution requirement. Do I have any other licensing options?

A: Yes. We offer an enterprise edition of Terracotta, available under a commercial license, for an annual subscription. Our enterprise packages eliminate the attribution requirement, and they include mission-critical support, plus warranty and indemnification assurances. For more information, please contact info@terracotta.org.

Q: Can I distribute Terracotta?

A: Yes. You can make and distribute unlimited copies of Terracotta covered by the TPL without payment of royalties or license fees, but you must redistribute Terracotta with attribution and under the TPL. If you bundle Terracotta with your own software, you have the freedom to choose a license for your own software.

Q: If I make changes to Terracotta source code and use them internally, do I have to contribute those changes back to Terracotta?

A: No. If you don't distribute those changes outside your enterprise, then you don't need to contribute those changes back.

Q: Can I make changes to Terracotta source code and distribute those changes?

A: Yes, as long as you retain the attribution to the original code developers and that you share any code changes by publishing the source code along with your modifications.

Q: Does Terracotta link to third-party software that may require different licenses?

A: Yes. Terracotta will frequently bundle third-party Java libraries as a convenience for our users. A complete list of bundled third-party libraries and their respective licensing information can be found as part of the Terracotta download.

Q: If I have a question that isn't answered in the FAQ, how can I get help?

A: We will try to answer any questions you may have. Please post your questions to our licensing forum at http://forums.terracotta.org/forums/forums/list or you can email us at license@teracotta.org.

Real-World Examples

Q: I am an ISV. Can I embed Terracotta software in my software, and then distribute it without open sourcing my software?

A: Yes, you can redistribute Terracotta code in your software without open sourcing, as long as you provide attribution to Terracotta. You can ship your own code under a license of your choice, including a proprietary license. You'll need to ship the Terracotta code (and any modifications you make to it) under the Terracotta Public License.

Q: I'm running a web app under an app server, and I'm using Terracotta as well. Do I need to comply with the attribution requirement?

A: No. In this case, you're not distributing any Terracotta code, so the attribution requirement doesn't apply.

Q: I want to write software that uses Terracotta, but my software would run in headless mode, without a GUI. If I distribute my software, how would I comply with the attribution requirement?

A: If you distribute your software and it includes Terracotta code, you'll need to include attribution. The attribution requirement applies to all user interfaces, including command-line interfaces, and not just GUIs.

Q: I work for a large company and want to use Terracotta to cluster my apps. If I only deploy Terracotta within my company (including contractors who work at my company), do I need to comply with the attribution requirement?

A: No. You are only required to include the attribution notice if you redistribute Terracotta, or any derivative works that you build from Terracotta. "Redistribute" means to give (or make available for download) the software to a third-party – in other words, someone outside of your company (other than contractors who work at your company).

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators