This file gives a general overview of the ANGEL project files and describes how to run the ANGEL application. --------------------------------------------------- File organization: --------------------------------------------------- /team7 /app - project source files and application files /html - project web pages /tests - test scripts /tools - associated tools /src-cvs - the cvs repository --------------------------------------------------- Overview: Building and running the application --------------------------------------------------- IMPORTANT: The only modules that should be started on a 'sacred machine' are: Naming Service, Replication Manager and Database. To build the application, follow the following sequence of steps: 1. Login to any computer in the ece cluster, such as: telnet go.ece.cmu.edu 2. Switch to the Team7 directory: /afs/ece.cmu.edu/class/ece841/public_html/team7 3. Set up your environment by following the instructions in the section A 4. Do a CVS checkout ( instructions in the section B) - optional, only need when some changes were done 5. Build the server ( instructions in the section C) - optional, only need when some changes were done 6. Build the client ( instructions in the section D) - optional, only need when some changes were done To run the application, follow the sequence of steps given below: 1. Login to any computer in the ece cluster: telnet asl.ece.cmu.edu 2. Switch to the Team7 directory: /afs/ece.cmu.edu/class/ece841/public_html/team7 3. Set up your environment by following the instructions in the section A 4. Start the database ( instructions in the section E) - optional, only needed if the database is not running 5. Start the naming service ( instructions in the section F) 6. Start Replication Manager ( instructions in the section G) 7a. Start Server ( instructions in the section H) 7b. Start Executive ( instructions in the section I) - optional, this Executive only restarts Server if it detects a crash. Replication Manager works independently from Executive 9. Start the client ( instructions in the section J) Each of these steps is described in further detail in sections below. --------------------------------------------------- A: Setting up the environment --------------------------------------------------- These instructions assume you are using the Bash shell. For the immediate future, please switch to Bash if you are using something else. 1. Change to the app/config directory. 2. Source the setup.sh file. The setup.sh file assumes you will be running the application from the Team7 directory. If you would like to run the application from another directory, edit the setup.sh file. Specifically, change the WORK setting to point to your own environment. --------------------------------------------------- B: CVS Checkout --------------------------------------------------- 1. cd to /afs/ece/class/ece841/public_html/team7. 2. cvs -d /afs/ece/class/ece841/public_html/team7/src-cvs co app --------------------------------------------------- C: Build the server --------------------------------------------------- This automaticaly builds the Replication Manager and the Executive as well 1. cd to app/server/src. 2. type ant. --------------------------------------------------- D: Build the client --------------------------------------------------- 1. cd to app/obe-client. 2. type make. --------------------------------------------------- E: Starting the database --------------------------------------------------- IMPORTANT: We've provided scripts to make starting and stopping the database easier. Use them! Avoid killing the database processes manually. To start the database: 1. Go to our sacred machine (go) 2. cd to app/bin 3. type ./startDB & To stop the database: 1. cd to app/bin 2. type ./stopDB NOTE: If the database fails to start, it could mean that it is already running (either on another machine or via another user). If you'd still like to restart the database, you'll need to track down the user that is running it to have them shutdown the database properly. If you would like to run the database from another linux machine, you will need to edit the database settings in file app/config/server.properties. Note it appears in a couple of places! --------------------------------------------------- F: Starting the naming service --------------------------------------------------- 1. Be sure that DB is started on the sacred machine (go) and that you are on the sacred machine in our directory 2. cd to app/bin. 3. run ./startNameServer --------------------------------------------------- G: Starting the Replication Manager --------------------------------------------------- 1. Log in to our sacred machine (go) 2. cd to our directory(DB and NS are started 3. cd to app/bin 4. type ./runRepManager,note that -d switch is supported for more debug information. --------------------------------------------------- H: Starting the server --------------------------------------------------- 1.Be sure that you are not on the sacred machine, environment is set up 2. cd to app/bin 3. type ./runServer1 , to start the first server ,and -d switch is supported for more debug information. - expecting to see "TrafficControlServer 1 ready and waiting ..." 4. Log in to enother machine, cd to our dir, setup the environment 5. type ./runServer2 , to start the second server,and -d switch is supported for more debug information. - expecting to see "TrafficControlServer 2 ready and waiting ..." --------------------------------------------------- I: Starting the Executive --------------------------------------------------- IMPORTANT NOTE: Each Executive has to be on the same machine as the Server it monitors. This is OPTIONAL, the this Executive only restarts the Server if it detects a crash. The Replication Manager works independently from the Executive. 1. cd to app/bin 2. type ./runExec1,note that -d switch is supported for more debug information. 3. type ./runExec2,note that -d switch is supported for more debug information. --------------------------------------------------- J: Starting the client --------------------------------------------------- IMPORTANT NOTE: Exceptions: Server Crash : The exception CORBA/COMM_FAILURE is interpreted as an indication that the server has crashed. In that case, the replication manager is queried for the name of the backup replica, which is then resolved with the help of the name service to get the server object. This process is repeated till the exception keeps occuring due to calls to the server. Other exceptions: All other exceptions are caught explicitly, but not handled separately. During Join, any exception causes the client to try to Join again. Otherwise, the client calls leave and exits in case of an exception. When running the client without the Replication Manager, TrafficControlServer1 has to be the primary server initially. 1. cd to app/obe-client 2. type ./runclient, for every client that needs to be run.