UMBC  |  CSEE  |  Tarr  |  CS491D

CMSC491D Design Patterns In Java

Fall 1999

Project 2

RMI Chat Server Project

Due Date: December 8, 1999


Project Description

In this project, you will be implementing a simple chat server using RMI. Once clients establish a chat session with the server, they can send messages to the server which then broadcasts the messages to all other clients participating in the chat session.

This application will require that both the client and server have remote objects. The server has a remote object which implements the following interface:

      public interface ChatServer extends Remote {
         public void registerClient(ChatClient client) 
            throws RemoteException;
         public void unregisterClient(ChatClient client) 
            throws RemoteException;
         public void broadcast(String msg) throws RemoteException;
         public String[] getHistory(int n) throws RemoteException;
      }

These methods do the following:

The client has a remote object which implements the following interface:

      public interface ChatClient extends Remote {
         public void update(String msg) throws RemoteException;
      }
This is the object that the client registers with the chat server. The update() method of this interface does the following:


Project Requirements

Use the above interfaces to write a working version of the RMI chat server application. Implement both the server and the client programs.

Implement the client interface any way you like, either textual or graphical.

Test your application with at least two clients and the server.

Your project code must also be well documented and use a reasonable indentation style. In particular, places where design patterns are implemented should be noted in the code.

Finally, a short report, no more than five pages in length, should be submitted describing the design patterns that appear in your project, either as part of the RMI framework itself or explicitly as part of your server or client implementation.


Project Grading

Your project will be graded according to the following criteria:

As in all your work, NO COPYING OR PLAGIARISM. If such is detected, no credit for the project will be given and appropriate actions for academic dishonesty will be taken.


Project Submission

You must submit the following: Submit all of the above using the submit program. To submit, you type
        submit cs491d project2 <filenamelist>
where filenamelist is a list of one or more files. You can submit a file as often as you like; the latest file submitted overwrites any previous submissions. To list the names of the files you have submitted, type
        submitls cs491d project2
To remove a previously submitted file, type
        submitrm cs491d project2 <filename>


Project Due Date

This project is due December 8, 1999. You have a five day, automatic, no-need-for-a-lame-excuse grace period.

No project will be accepted after December 13, 1999. NO EXCEPTIONS! NO EXCUSES!


Bob Tarr
University of Maryland, Baltimore County
tarr@umbc.edu
UMBC  |  CSEE  |  Tarr  |  CS491D