views:

1204

answers:

4

I am looking for good example code for terracotta. Especially around using master/worker pattern. In particular using custom routing (we like, but would like to use some strick data affinity type routing - ie. one worker looks after a set of task types ).

Also examples or experience setting up masters and topologies would be great also.

+1  A: 

Just my tiny cent:

I read alot about EC2 and terracotta often come up. Stuff like this:

http://blog.decaresystems.ie/index.php/2007/02/12/amazon-web-services-the-future-of-datacenter-computing-part-2/

EDIT: Note that EC2 now is offering persistent storage which should help alot with this terracotta stuff.

svrist
+2  A: 

This example got me interested in terracotta,

http://www.terracotta.org/confluence/display/~jboner/Build+a+POJO-based+Data+Grid+Using+Open+Terracotta

Which gives plenty of code examples to get you started

Paul Whelan
+2  A: 

The Apress book "The Definitive Guide to Terracotta" (to which I contributed) has a chapter on Master/Worker with an extended example. Jonas Boner (mentioned above) is the primary author of that chapter.

This page links to places to buy, a free chapter, and all the example code which is available for free:

http://terracotta.org/web/display/orgsite/The+Definitive+Guide

The Master/Worker stuff from the book has since been refined and is available as a Terracotta Integration Module on the Terracotta Forge at:

http://forge.terracotta.org/releases/projects/tim-messaging/

Alex Miller
+3  A: 

Not sure this is of interest to you, since they are much smaller in scope, but the Terracotta.org web site provides a number of ready to go "recipes" that demonstrate a number of concepts Terracotta:

Terracotta.org Recipes (code samples)

Taylor Gautier