SDSC Matrix 2.0 Installation Instructions

The following are the instructions to install SDSC Matrix 2.0 server, client and run the examples. If you need any help, e-mail srb-chat@sdsc.edu.

A. System Requirements

  1. JDK 1.4+ (From Sun-J2SE)
  2. Ant 1.5.2+ (From Apache-Ant or Sun-JWSDP1.2-Ant)
  3. Tomcat 4.1.24+ (From Apache) <Or> You can also use the Java Web Services Developer's Pack (JWSDP1.2) instead of Tomcat.

B. System Setup

  1. Install JDK
  2. Install Ant
  3. Install Tomcat
  4. Set the environment variable JAVA_HOME to JDK Install Directory
  5. Set the environment variable ANT_HOME to Ant Install Directory
  6. Set the environment variable CATALINA_HOME to Tomcat Install Directory
  7. Add ANT_HOME/bin in your path so that you can run the ant tasks required later.
  8. Download the SRB tarball. Once you get the key from the SRB Team, you can un-tar the files.
  9. Un-tar the matrix code into a directory. From this point on, we will refer to that directory as MATRIX_HOME. (it's the one that contains the file build.xml)
  10. Open build.properties file in MATRIX_HOME. Change the tomcat.dir property to the value of CATALINA_HOME (Tomcat Install Directory)

C. Installing the Matrix Server

  1. Go to the MATRIX_HOME directory
  2. Type ant war (and of course press enter or return key ;-).
  3. This will generate the file matrix.war in the MATRIX_HOME/webapps
  4. Copy matrix.war to CATALINA_HOME/webapps
  5. Before starting Tomcat, update the matrix.properties file in the MATRIX_HOME/conf directory for the following properties
  6. Now to start Tomcat, go to the directory CATALINA_HOME/bin
  7. Run startup.bat (startup.sh for UNIX users). This will start the Tomcat Server.
  8. When you start Tomcat, Matrix will now be installed at the URL: http://[machine-ip]:[tomcat-port]/matrix/receiver . So if you are running Tomcat locally, the URL will most likely be: http://localhost:8080/matrix/receiver
  9. To verify that the installation was successful, go to http://localhost:8080/matrix/receiver .You should see the message "You have successfully installed SRB Matrix." In the following section, "Installing the Matrix Client Examples", you will need to configure clients to connect to this URL.

D. Installing the Matrix Client Examples

  1. Go to MATRIX_HOME directory.
  2. Type ant client.
  3. (Optional) Type ant client-docs if you want the API documentation for programming.
  4. Go MATRIX_HOME/examples.
  5. Open examples.properties file. Change the server.url property to http://localhost:8080/matrix/receiver (as always, replace this URL with the URL of a different Matrix Server if you're not running the server locally)

E. Running the Matrix Client Examples

  1. You must have built both the server and the client, and have started up the server.
  2. Go to MATRIX_HOME/examples directory.
  3. To set the classpath settings type setMatrixClasspath.bat on Windows users or Set the classpath to the value in the file classpath.sh for UNIX users
  4. This ensures that classpath has been set to run the client examples
  5. MatrixDemo and MatrixDemoQuery

a)     These two programs show how to use the API for a simple transaction

b)     The datagrid request will contain one transaction with three flows

c)     Type java MatrixDemo to run the demo

d)     This program will create a Data Grid Request to send to the Matrix Server

e)     Input the values requested by the program or accept the default values by pressing “Enter”

f)      The program will send a datagrid request to the Matrix server using the input details

g)     The Matrix Sever will return an acknowledgment which contains the Transaction ID of the data grid request

h)     Type java MatrixDemoQuery to run the status query example

i)      This program will retrieve the status of the Transaction executed by running MatrixDemo

j)      Enter the Transaction ID from step (g) to check the transaction status

k)     The program will display the high level details of the Transaction Status Response

  1. DataGridRequestExample and DataGridResponseExample

a)     These two programs show a much more complex example of how to use the API

b)     Type java DataGridRequestExample to run the request example

c)     This program will send a datagrid request to the Matrix server consisting of one transaction with multiple flows.

d)     The Matrix server will send back an acknowledgement with the transaction-id  that will be printed out on your screen

e)     Type java DataGridResponseExample to run the response example

f)      This step will allow you to query on the status of the transaction. Enter your Transaction ID you got from step (d) above.

g)     The program will return the status of the transaction requested

h)     You will see the current status of your datagrid request.

i)      If you want to clean up the collections or data sets created during this demo, you need to type java ExampleClean.

  1. You may wish to look at DataGridRequestExample.java , DataGridResponseExample.java, MatrixDemo.java and MatrixDemoQuery.java present in the MATRIX_HOME/examples directory for playing around with the API. The files have been commented to explain the different steps involved in creating a data grid request for different type of flows and operations.

 

IF you have any problem in using the software e-mail srb-chat@sdsc.edu or refer our SRB-Chat archives.