[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Master - Worker - queue is not instrumented  XML
Forum Index -> Terracotta for Spring
Author Message


Joined: 07/09/2010 06:40:15
Messages: 2

Hi all,

we're currently evaluating Terracotta to our server cluster. We've a master - server setup where Tasks are being pushed into a ThreadPoolExecutor backed by a LinkedBlockingQueue.
I want this Queue now to be distributed over all nodes via Terracotta. Terracotta and our jetty instances are starting up fine, but the queue is not instrumented.

Since this is my first steps with terracotta, I guess I'm just missing something somewhere.

I tried to configure via tim-annotations and tc-config.xml. Both doesn't work.

Here is my setup:
The "queue" is what I want to be distributed.
package com.company.package.impl;
 import java.util.List;
 public class UserSchedulerImpl implements UserScheduler {
 	static Logger log = LoggerFactory.getLogger(UserSchedulerImpl.class);
 	private ThreadPoolExecutorService threadPoolExecutorService;
 	private UserPreProcessor userPreProcessor;
 	private TimingThreadPoolExecutor userThreadPoolExecutor;
 	private LinkedBlockingQueue<Runnable> queue;

my tc-config.xml:

<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
   <!-- Tell DSO where the Terracotta server can be found;
        - Terracotta Configuration Guide and Reference
        - About Terracotta Configuration Files
        for additional information. -->
     <server host="%i" name="sample">
      <statistics>%(user.dir)/logs/terracotta/client-statistics/%D</statistics> -->
        <module name="tim-annotations" version="1.5.2" />
        <module name="tim-jetty-6.1" version="2.1.3" />

Jetty process:
/opt/jdk/jdk-nowplus/bin/java -javaagent:/opt/sng/spring-instrument-3.0.0.RELEASE.jar
 -Dtc.install-root=/opt/terracotta/current -Dtc.config=/opt/terracotta/current/tc-config.xml
 -Djetty.home=/opt/jetty-6.1.18 -Djava.io.tmpdir=/tmp -jar /opt/jetty-6.1.18/start.jar
 /opt/jetty-6.1.18/etc/jetty-logging.xml /opt/jetty-6.1.18/etc/jetty.xml

Maybe there's something obvious I got wrong. I tried lots of stuff, but I'm somehow stuck here.

Thanks a lot in advance!


Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA

I haven't looked to see why your LBQ is not clustered.

But 2 questions for you:

1. Did you know sharing an LBQ in Terracotta is one of the slowest performing things you can do? Why didn't you use TIM-Messaging at least? It abstracts away the queue and speeds things up in clusters larger than 1 or 2 JVMs

2. Have you tried to map your problem to the Terracotta Toolkit? The Toolkit gets rid of the need for bytecode manipulation and bootjars and stuff. Ideally you would map to Ehcache which is highly tuned and can do 100k+ tps to queues 100+ tps (orders of magnitude faster). But the toolkit might be worth a try too.

Is it possible for you to retool at this point? You will be a lot happier w/ the Toolkit or, better yet, Ehcache.



Joined: 07/09/2010 06:40:15
Messages: 2

Hey Ari,

thanks for your reply. To answer your questions:

1. No didn't know that terracotta is performing slow here. We already have this queue in place and this would have been the easiest way forward. However I will definetly have a look at TIM-Messaging now. Didn't know that at all.

2. Will have a look at the toolkit as well.

I'm new to terracotta and only have a basic idea of it's capabilities. We're currently using a distributed ehcache as well (w/o terracotta) and migrating the distributed cache to terracotta might be step two.

Basically we push userIds to the queue and each user task will take around 10-60s. So a slow performing queue shouldn't even be a bottleneck. However TIM-Messaging sounds interesting. Will have a look at it.

I'm still clueless why my queue is not distributed with the current configs.

Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team