[Please note: This is a preliminary version of this assignment made available to give you a clearer view of the workload for this class. I might make some changes]

 

Assignment 2: Implementation of a simple chat system using RMI.  You can work in groups of up to four on this assignment.

 

Due date: See website 

 

Late policy: 33% point deduction for each late day.

 

The story: You will implement a simple, chat system based on the Java RMI middleware.

Your chat system includes two types of components: a chat room and the clients. The clients may appear at any time, but the chat room is a long-lived 'server' component. There is no notion of user registration; any chat client can send a message as soon as it connects.  All messages are to be broadcasted to all clients connected to the chat room.

Constraints: only the chat room server can be registered in the rmiregistry

More details:

The server does not need to have a GUI, a command line-based user interface is good enough.

Try to keep the client user interface (UI) in as simple as possible: as long as the user can enter her messages and the UI can properly display the messages received from the other chat users your UI is fine. To simplify things, here I provide a simple UI as a Java application (we will discuss its design in class). You are free however to implement your own GUI.

You may use any Java development environment you like.

Deliverables

Email to 202020m@gmail.com the following:

A single zip/tar file containing the following

  1. A brief readme file listing your name(s), student IDs, and everything you think it is worth mentioning about your implementation;

Your readme file should include comments on the main design decisions you have made:

·         Pull vs. push design

·         A description of the remote interfaces

·         Message formats

·         How does your code deal with concurrency-related issues

·         How does the chat server deal with client failures

·         How do clients deal with chat server failures

·         Any other decision you feel it influenced your design

  1. A HowTo.txt file, detailing how to run the server, and the client.

 

  1. TWO separate executable JAR files. They may have the same content, with the following exceptions:

The procedure for creating an executable JAR file is detailed here. The TA will be running your program with the following steps at the command line:

java -jar server.jar <chatroom_name>

java -jar client.jar <chatroom_name> <client_name>  [rmiregistrymachine:port]

As you can guess, the ‘chatroom_name’ is the name the server uses to register the chatroom with the RMI registry

  1. TWO folders containing your source files, one folder for the server source files, and the other for the client source files.

Note: The email account is setup to reply with an acknowledge email to your email submission.

Grading details

In evaluating your work, 10% of the credit will be earned for quality of design, 15% for source code organization and documentation, and 75% for correct operation of the program.

If the TA is unable to run your program, you will get a zero on that portion of the assignment.

The TA will first try to execute your code in two separate VMs on the same physical machine with the rmiregistry running on the same host.  If your code passes this test you get 90% of the points allocated for the correct operation of the program. 

 

The TA will then try to run your program on two separate boxes with the RMI registry running on the same box as the chat server.  While, you are not responsible for helping the TA configure the code to run in this setup you should attempt to test it yourself in a similar scenario.

 

Useful links

§    Dynamic code downloading using Java RMI (using the java.rmi.server.codebase property) link