CMPU-375: Networks

Vassar College, Fall 2007

Midterm Project: Fancier email server and client

Due: Thu, Oct. 11, 2007




Description:

Implement a fancier email server and client than you did in assignment 1.  At this point, you've seen:
  1. how to write server and client code that communicates over a network
  2. how to write a nonblocking server
  3. how to serialize objects using files
In this midterm project, you will have the opportunity to integrate all of the above into a more creative and convincing client-server email application. You are encourage to look to your earlier assignments and chapter examples as you design your project solution.

Implementation details:  

Design an email server capable of delivering messages between uniquely named users who have email id's. That is, the server will need to keep track of who each message gets delivered to (not just "Dave" and "Karen"). Design a reasonable way to identify valid recipients, and if a message is undeliverable, a reasonable way to deal with this possiblity (i.e., inform the sender). The email server should store the sent but undelivered messages in a Vector of messages. A fault-tolerant server would save its undelivered messasges in case it needs to be restarted for any reason. This is not required, but it is one of the extra features you could consider implementing.

An email message will be a serializable object, and at a miniumum, contain a sender, recipient, subject, and body (these fields can all be strings).

Design a GUI-based email client that permits the user to send and receive email messages, and quit. When sending a message, the client should construct an email object from the GUI fields, then save it in the client's outbox, and send the email to the server. The client need only implement a single inbox and outbox, containing messages received and sent. When receiving a message, the client should add it to the inbox.

Your inbox and outbox should both be files of email objects, and you should use a Vector to facilitate reading and writing these message objects. That is, the inbox and outbox should be Vectors of email messages. You should provide a reasonable way to read messages in either mailbox.

The client program should permit the user to view their inbox and outbox somehow while the program is executing. Furthermore, the contents of a user's inbox and outbox should not disappear between client program invocations--like a real email client.

Overall, it should be possible for multiple simultaneous clients to send and receive messages without blocking the server.

Grading considerations:
Other considerations:

To hand in: