CIS 5930-04
Spring 2001

Homework #3

A Client/server application

    An RMI-based Server

    Building on the GUI you developed in the previous assignment, write a client/server application, in which a GUI running on a client machine (such as a PC) manipulates entries in a text file stored on a server machine, somewhere else on the Internet. Communication between client and server should go through RMI.

    You should design an RMI remote interface through which the client can read and write to a data file on the server machine. For simplicity, limit the interface to operations that read the whole file and write the whole file. If you wish, you may base your interface on the FileSource example discussed in the lectures (you may only need to add one method for writing).

    It is recommended you run the server implementing this interface on sirah, merlot or cabernet in CSIT.

    The client program may be either:

    1. A Swing applet, adapted from the program you produced in Homework II. The JFrame should be converted to a JApplet, and calls to your remote interface should be added for reading from and writing to the data file on the server machine. To view your applet you will need access to an Internet-connected computer, probably with the Java 2 browser plugin installed. This will be discussed in the lectures.

      Or:

    2. A Swing application, adapted from the program you produced in Homework II. Calls to your remote interface should be added for reading from and writing to the data file on the server machine. Class files for RMI stubs should be downloaded dynamically from a Web server. To run your client application you will need access to an Internet-connected computer, with Java 2 development software installed.

    You are encouraged to deploy HTML (if using an applet), and downloadable class files, in the directory /home/httpd/html/it1spring01/homework3/uid on sirah, where uid is your login id (user name) on this machine. You should then be able to view the applet at a URL of the form:

    http://sirah.csit.fsu.edu/it1spring01/homework3/uid/...

    Note: this assignment is supposed to be a relatively short exercise in getting an RMI based program running. It should not involve extensive new coding.

    Submission of your Homework

    Your submission should consist of files including
    1. A short description of your program, including instructions for running your server program, preferably in Microsoft Word, HTML, or plain text format,
    2. all Java source code,
    3. if you are using an applet, a suitable HTML page with an applet tag, and
    4. an example data file, to be placed on the server.

    On sirah you will find a directory called /home/project/it1spring01/homeworkr3/uid where uid is your login ID. To submit Assignment 3, please copy your files into this directory. Note this is not the same directory as the Web server directory mentioned above!

    Grading

    For this assignment, there will be a total of 15 points. Grading criteria are similar to Assignment 1. Some points will be assigned on the basis of apparent effort and uniqueness. To get full marks you should be using dynamic class loading, either by using an applet front end, or otherwise ensuring RMI stubs are loaded to the client dynamically.


    Useful resources

    Simple applet-RMI, client-server examples

    See the examples for the RMI lecture set, here.

    The Java 2 plugin

    This is available from Javasoft.
    Please send questions to Bryan Carpenter at dbc@csit.fsu.edu.