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
- JDK 1.4+ (From Sun-J2SE)
- Ant 1.5.2+ (From Apache-Ant or Sun-JWSDP1.2-Ant)
- 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
- Install JDK
- Install Ant
- Install Tomcat
- Set the environment
variable JAVA_HOME to JDK Install Directory
- Set the environment
variable ANT_HOME to Ant Install Directory
- Set the environment
variable CATALINA_HOME to Tomcat Install Directory
- Add ANT_HOME/bin in
your path so that you can run the ant tasks required later.
- Download the SRB tarball.
Once you get the key from the SRB Team, you can un-tar the files.
- 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)
- 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
- Go to the MATRIX_HOME
directory
- Type ant war (and of
course press enter or return key ;-).
- This will generate the file
matrix.war in the MATRIX_HOME/webapps
- Copy matrix.war to CATALINA_HOME/webapps
- Before starting Tomcat,
update the matrix.properties file in the MATRIX_HOME/conf directory for
the following properties
- jargon.filecache
- matrix.logFile
- writeToLogFile
- writeLogToConsole
- matrix.logLevel
- applicationMode
- Now to start Tomcat, go to
the directory CATALINA_HOME/bin
- Run startup.bat (startup.sh
for UNIX users). This will start the Tomcat Server.
- 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
- 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
- Go to MATRIX_HOME
directory.
- Type ant client.
- (Optional) Type ant
client-docs if you want the API documentation for programming.
- Go MATRIX_HOME/examples.
- 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
- You must have built both the
server and the client, and have started up the server.
- Go to MATRIX_HOME/examples
directory.
- 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
- This ensures that
classpath has been set to run the client examples
- 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
- 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.
- 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.