********* *To clear the database: ********* 1: ssh to mahjongg.lab.ece.cmu.local 2: Run "create_table.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/mysqlScripts/create_table.sql 3: Run "setup_templates.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/mysqlScripts/setup_templates.sql 4: Run "tr_i_game.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/mysqlScripts/tr_i_game.sql ********* *To run the Fault Tolerant demo: ********* 1: ssh into a cluster machine (e.g., magenta, periwinkle, or othello). 2: copy the server jar file (SuDuelKu.jar) to the deploy directory of JBoss. cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/server/SuDuelKu.jar /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/jboss/default/deploy/ 3: Set your JAVA_HOME environment variable to the appropriate install of java. On color machines => /usr/local/j2sdk1.4.0/ On games machines => /usr/local/j2sdk1.4.2_02/ 4: Start JBoss on two different hosts (i.e., fuchsia and carnation) /afs/ece/class/ece749/ejb/jboss-3.2.3/bin/run.sh -c team1 & 5: Wait for JBoss to finish loading (< 5min). 6: In a new terminal window, ssh into a different cluster machine. 7: Edit the suduelku.properties file such that the InitialServerList property is set to the two hosts where JBOSS was started in step 4. vim /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/suduelku.properties . . . InitialServerList = fuchsia:11099; carnation:11099 8: Startup the client (ssd.mse.client.ui.Driver) passing it the arguments: EJB . EJB is a flag to tell the application to use the remote game room rather then a local stub. User name can be any user name you wish to use. The properties file tells the client the list of servers it can contact (edited in step 7). Make sure that SuDuelKuNaming-Client.jar, jbossall-client.jar, SuDuelKuServer-Client.jar, and SuDuelKuClient.jar are on the classpath. Use below command, or run /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/runclient. /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/runclient or java -cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/lib/SuDuelKuNaming-Client.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/lib/jbossall-client.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/lib/SuDuelKuServer-Client.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/SuDuelKuClient.jar ssd.mse.client.ui.Driver EJB crnelson /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/ft-baseline-demo/client/suduelku.properties ********* *To play! ********* 1: You can list games with the "l" command. If you have just reset the database you will get a message saying there are no games. 2: Create a new game with the "c " command. 3: If you list games again with the "l" command you will see the game you just created listed with the name you supplied. 4: Use the "r" command to indicate you are ready to play. At this point you cannot select the game you would like to play, you simply get to play the last game you created. 5: Now you get to fill in the numbers on the board. In SuDuKu, the object of the game is to enter the numbers 1 - 9 into the squares such that there is only one occurrence of each number (1 - 9) in each row, column, and box (3x3 square). You can fill in a square using the "e " command. The rows and columns use a zero based index (e.g., the top left square is 0, 0). If you enter an invalid answer, the board is redrawn as it was before (error message to be implemented later). If you enter a valid number, the board will be redrawn updated with your answer. Squares that need to be filled in are represented with a '#' character. An example answer for the only game board currently in our application is 9 for square 0, 0 (top left) or 7 for square 6, 3 (top left square of the bottom center box). The game will notify you when you have successfully filled in all the squares. There is a unique answer, so there is no need to delete any entered number. ********* *Gotchas ********* 1: The user cannot select the game they wish to play, but must play the most recently created game. 2: There is no way to quit the game once it has started (other than control-C). 3: For most exceptions, when they are caught we only print a stack trace. We are slowly migrating to more graceful ways of reporting exceptions that cannot be recovered from to the user. 4: If the first server the client tries to connect to is not available (JNDI not running), the client exits without a message. 5: After 5 tries to find a new server when communication goes down, the client gives up with that message and reports the failure to the user. However, the client does not exit and allows the user to try again.