CloudTran Home

 
  
<< Back Contents  >  2.  Example Application Forward >>

2.3 Set Up and Run Independently of Eclipse

This section describes how to run the application outside of Eclipse; the previous section described running inside Eclipse.

 2.3.1  Installation
 2.3.2  Database Setup
 2.3.3  Configuring
 2.3.4  Running

2.3.1  Installation

Copy the unzipped contents of the distribution to each node you want to run on.


2.3.2  Database Setup

The application is set up to persist transactions to a single database and we provide the database for MySQL. See the instructions in the accompanying document "docs/Cloudtran-Coherence Reviewer's Guide - v1.0.*". There are Word (.docx) and PDF documents there.


2.3.3  Configuring
The database configuration is contained in examples\ChildActivities\classes\META-INF\persistence.xml. If you plan to deploy multiple cache + manager nodes, you will need to alter the database's IP address. Change the localhost reference here
value="jdbc:mysql://localhost:3306/cloudtranTest"
to point to the host and port that is running the database.

If you need to change the Coherence configuration, follow the instructions here.

The application is configured to use multicast, so any nodes on the same network which have the same cluster name will find each other.

There are Windows batch files at the top level of the project for starting up the Isolators, the Managers and the Client, (startIsolator.bat, startManager.bat and startActivityTest.bat, respectively). These can be edited to pass in a different cluster name if you are running multiple Coherence clusters. The output will appear on the console of each manager and also of the client, but you can also create a separate log file the name of which is passed in to the process through the batch file.

In the client batch file, there is no log file set, so the output comes to the console. If you want it to be logged to a file, add -Dtrace.file=[mylog].log into the Java command line in the batch job.


2.3.4  Running
The example application has been written to run with one client, and although in principle it could run with many there would be no aggregation of the statistics. So to test scale out easily
  • Start up the database if it isn't already. There are scripts in the /CloudTran-Coherence1.0/MySQL to start and stop a pre-configured MySQL database.
  • Start one isolator. A second isolator only becomes active when the first isolator goes down, so it does not affect scale-out performance.
  • Start as many managers as you want. If you have four-core machines, you can start two managers on those to maximise performance per node.
  • Start the client with an increased number of threads. In the startClient.bat batch job, the first two numbers at the end of the last line are the number of iterations per thread and the number of threads respectively. A rough rule of thumb for loading the grid is to use 100 threads per manager node at the client.

    Increasing the number of iterations will not change the throughput, but will make the overall test last longer. This could be useful if you want to monitor the performance of the Coherence grid using a visual monitoring tool.

The client console outputs performance statistics at the end of the run.

Copyright (c) 2008-2013 CloudTran Inc.