- Downloading and unpacking the nightly build or beta from Terracotta
- Staring the Terracotta server by calling the ./bin/start-tc-server.sh
- Running 2 instances of the compiled versions of any of the above
Scaling software should be an activity done with ease by Hardware, Cloud and System Administrators without knowledge of the applications being scaled.
Thursday, June 24, 2010
A Couple Minutes With Some Toolkit Samples
Wednesday, June 9, 2010
A Couple Minutes With The Terracotta 3.3 Beta
- Simple Scale - Reduce the need for tuning and tweaking with an improved next gen datastore. It will allow the everyday user to achieve the kinds of scale needed for massive applications both in data size and number of nodes.
- Improved Visibility - We have added panels for Quartz and Sessions to our developer console giving full visibility to the full suite of performance and scale-out products. We have also added a more product focused organization of information in the tool.
- Simple HA - A new panel that makes it easier to monitor interesting events that occur in a cluster. Pre-built templates for various configurations. Simplified way of migrating nodes, better defaults.
- Modularity - We have exposed some of our most powerful pieces and parts as a versioned standard API that can be simply coded against to get things like, locking, queuing, maps and cluster topology. We use this API to build all four of our core products (Ehcache, Quartz, Hibernate 2nd level cache, Web Sessions).
Tuesday, May 18, 2010
Steve Jobs Stanford Commencement
Friday, May 7, 2010
A Couple Minutes With Non-Stop Ehcache
- Download Ehcache 2.1
- Download the NonStopCache 1.0
- Start the Terracotta server
- run the below program (source code below)
Regular cache. No Decorator
The size of the cache is: 0
After put the size is: 1
Here are the keys:
Key:0
Done with cache.
Sleeping, Stop your server
Disconnected NonStop with noop cache.
The size of the cache is: 0
After put the size is: 0
Here are the keys:
Done with cache.
Disconnected NonStop with local reads cache.
The size of the cache is: 1
After put the size is: 1
Here are the keys:
Key:0
Done with cache.
Disconnected NonStop with exception cache.
Exception in thread "main" net.sf.ehcache.constructs.nonstop.NonStopCacheException: getKeys timed out
at net.sf.ehcache.constructs.nonstop.behavior.ExceptionOnTimeoutBehavior.getKeys(ExceptionOnTimeoutBehavior.java:114)
at net.sf.ehcache.constructs.nonstop.behavior.ClusterOfflineBehavior.getKeys(ClusterOfflineBehavior.java:120)
at net.sf.ehcache.constructs.nonstop.NonStopCache.getKeys(NonStopCache.java:264)
at MyFirstNonStopEhcacheSample.addToCacheAndPrint(MyFirstNonStopEhcacheSample.java:45)
at MyFirstNonStopEhcacheSample.(MyFirstNonStopEhcacheSample.java:40)
at MyFirstNonStopEhcacheSample.main(MyFirstNonStopEhcacheSample.java:60)
What Just Happened?
The cache is first loaded into an ordinary undecorated cache. This is performed before the server kill and proceeds without incident. The next round of operations on the cache were performed with the server down.
- These decorators are all being used on the same cache. This way you can make the behavior specific to the user of the cache. It gives tremendous flexibility.
- You'll notice this little sample flies through despite the timeout being set to 13 seconds. This is because it's in fail fast mode. In this configurable mode if the cache knows it can't communicate it will return the failure case immediately. If that's not what you want you can instead set it up to not fail fast and wait the full timeout no matter what.
- I did this work in config but the same setup can be done in code
And the Config file ehcachenonstop.xml:
Saturday, May 1, 2010
A Couple Minutes With Terracotta Toolkit Nightly
- Downloaded the nightly and unpacked
- Grabbed a quick sample app
import org.terracotta.api.ClusteringToolkit;
import org.terracotta.api.TerracottaClient;
import org.terracotta.coordination.Barrier;
public class PlayingWithExpressBarrier {
public static void main(String[] args) {
final String barrierName = args[0];
final int numberOfParties = Integer.parseInt(args[1]);
//Start the Terracotta client
ClusteringToolkit clustering = new TerracottaClient(
"localhost:9510").getToolkit();
//Get an instance of a barrier by name
Barrier barrier = clustering.getBarrier(barrierName,
numberOfParties);
try {
System.out.println("Waiting ...");
int index = barrier.await();
System.out.println("... finished " + index);
} catch (Exception e) {
e.printStackTrace();
}
}
}
- I worked in eclipse so at this point all I had to do is add the toolkit jar to the classpath to get it to compile
- Now kickoff the Terracotta server
- And run the sample 3 time
Thursday, April 29, 2010
Countdown To The Terracotta Toolkit Beta
- Ease of use is paramount - For both the developers that leverage the Terracotta toolkit and the people who use the stuff built using the Terracotta toolkit
- Stable API matters - We are building a compatibility kit and will maintain a strict and clear versioning scheme so that framework developers can rely on and clearly know what versions of Terracotta can work with the API version used in the application. Your users can just drop in any version of the terracotta-toolkit.jar that implements the version of the API you coded against.
- Parts is Parts - Get all the useful parts we use to build our products packaged and out for others to use.
- Scale Continuum - The parts should work both clustered and unclustered continuing our vision of a scale continuum.