CS 441 - Distributed Object Programming

Fall 2006

Programming Assignment 2: RMI

Due: Monday 10/16/2006 at 11:59 pm

For this program, you are to use Java RMI to create a distributed auction program. We will not be creating anything as complex as ebay, but that is a good example of an distributed auction program.

The server for the project will be running the main database for the auction service and it will need to maintain the key pieces of data. These three pieces of data must be objects maintained in Java Classes.

  1. The items to be auctioned
  2. The people bidding
  3. The bids
The information maintained for the items are to include an unique item number, a short summary description (20 - 30 characters long at most), a longer detailed description, an indication on whether the item can be bid on and a sellor id (the id number of the person selling this item). You may use any method you wish to make sure the item numbers are unique. It is suggested that you program keep a numeric value that is incremented every time a new item is added. This item number will be used as the key to access an item. The sellors of the items are assumed to be people who might also be bidders, so the sellor id should reflect a known bidder number. You use a sellor number of -1 for an anonymous sellor (or when you don't want to worry about finding a valid bidder number).

The information for the bidders must include an unique bidder number, a first name, a last name and an email address. Again you may use any method that you wish to make sure the bidder numbers are unique. It is again suggested that you program keep a numeric value that is incremented every time a new item is added. This bidder number will be used as the key to access a bidder.

The bid information is to contain a valid item number, a valid bidder number and a monetary amount. Your program will only need to keep track of the highest bid for an item and additional bids on an item must always be larger than previous bids.

Your server must be able to crash without losing data. Therefore, it must be able to stopped and restarted keeping the same data that it had before it was stopped. The simpliest way to do this is to write out the data maintained by the server to a file every time the data is changed. When the server is restarted, it will just read the data from the file to remember what it had previously. The use of serializable files is highly suggested to help you do this. The naming scheme used by your program is left up to you. However, these files must be stored in the same directory as the executable code or in a subdirectory of that directory. If the files to not exist initially, your program is to start with an empty database.

The primary operations for the auction operations will be done via the client machines. We will not require the clients to log into the server as a particular bidder, thus from one client process, the user could place bids for many different bidders. The operations to be done by a client are to include:

  1. Create a new bidder (and sellor)
  2. Create a new item for auction
  3. List the items for auction
  4. Display the details about an item for auction
  5. List the bidders
  6. Open an item for bidding
  7. Close an item from bidding
  8. Make a bid on an item.
You may wish to add a few other operations (such as remove an item or bidder), but that is left up to you.

Submission of the Project

You are to submit a README file that describes the naming scheme used by your program for permanent storage of the data. This file should also contain any other information you feel the TA should know when grading your project. The purpose of the readme file is to make it as easy as possible for the grader to understand your program. If the readme file is too terse, then (s)he can't understand your code; If it is overly verbose, then it is extra work to read the readme file. It is up to you to provide the most effective level of documentation.

You may work on this project by yourself or with one other person. If two people are working together, your group is to submit only one copy via turnin. Make sure that the names of both students are clearly identified in all files submitted and in your README.

Your program is to be submitted electronically via the turnin command on the CS Department's LINUX machines. The project name for this is mp2. All programs are expected to be written in good programming style using the java programming language.

How to turn in your work

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

turnin -c cs441 -p mp2  [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.

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 mp2 -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.