CS 441 - Distributed Object Programming

Spring 2011

Project 2

Distributed Booking Agent using Java RMI

Due: Monday, February 28, 2011 at 11:59 pm

For this project, you are to use Java-RMI to redo the application from Project 1 with a few differences.


The Original Write Up for Project 1

For this project, you are to use the Java sockets API to create a distributed application that will allow a company to keep track of reservations for some events. The project will not not require any form of stored database. If the server stops/crashes, all data can be lost. We will worry about this aspect in future projects. (If you wish to store/restore the database, you are more than welcome to; however, that is not a requirement of this project.)

The Server for this project will just need to maintain the database and handle connections from the clients. The server is to allow multiple clients to be able to connect simultaneously. The server also needs to be able to generate unique values for the the Event numbers and unique values for the Reservation numbers. Using an integer that increments each time a new number is requested is sufficient for this requirement.

There will be two forms of clients for this project. A Manager Client and an Agent Client.

The Agent Client is the simpler of the two. It will allow the following operations:

Note that the Agent Client does not need a persistent connection to the server. So this could be implemented to establich a connection to the server for each operation that is needed to be performed which would then terminate the connection to the server after the transaction has occurred.

The Manager Client will be able to perform all of the tasks done by the Agent Client plus:

Note that there may be multiple Manager and Agent Clients running at any particular time. You may assume that the server use a known port number which may be hardcoded into your code. A good port number to use is the result of adding 10,000 to the last 4 digits of your UIN.

Your project is to be turned in electronically via turnin to the CS 441 instructor account using the project name of "proj1". Each student is to work independently on this project. You are also to write up a README file that discusses how to compile and run the project, the form of how the the reservation data is stored by the server and the communication protocol used between the server and the clients. Also, there will be some points for the project awarded based on programming style used in your project.

How to turn in your work

Turnin your program electronically using the "turnin" command from your CS account as follows:

turnin -c cs441 -p proj1  [your project directory]
where the [your project directory] is the directory name under which you have all your files related to this programming problem. The turnin command will automatically compress the data under your directory, so there is no need to do the compression by yourself. This also assumes that you are in the parent directory of the project directory when executing the command.

Notice you can only invoke turnin command on the Linux machines in the lab or after logging into the server machine oscar.cs.uic.edu.

If you want to verify that your project was turned in, look in the turnin directory for a file with your userid. For instance for this project, from your CS account you would type:
  

    turnin -c cs441 -p proj1 -v

Note that you can execute turnin as many times as you would like, up until the program deadline when turnin will be disabled for this project. Each time you execute turnin for a project, you overwrite all of what you had turned in previously for that project.It does not work in an incremental way.