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:
- how to write server and client code that communicates over a network
- how to write a nonblocking server
- 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:
- Implementing all the features described in a reasonable fashion will result in a maximum grade of 90%.
- Especially creative solutions that impress me will be considered for more credit, up to the maximum 100%.
- I'm looking forward to seeing your creative solutions!
Other considerations:
- Unlike for assignments, since this is a midterm project; if you have questions, you may discuss them only with me.
- Be sure to fully document your code, including header comments in all files.
- You
are being given two weeks to complete this project because it will take
you more time than the previous assignments. You will also need to do a
certain amount of design, which you haven't really had to do before.
You are encouraged to get started right away.
- I'm
sure you will have questions that arise as you design your
implementation. You are welcome to ask for my input, though keep in
mind your final product will be a unique and creative expression of the
work you put into it. There are often no right or wrong answers, just
design decisions.
- Finally, this project should be fun to implement, so enjoy, and good luck!
To hand in:
- A write-up describing your design and implementation experiences. This will be easier if you keep a log as you go.
- A printout of all source code files
- An electronic copy of your EmailClient.java source code, via the submit375 script:
- cd
- cd cs375
- submit375 midterm (assuming you named your subdirectory midterm)