- Provide a protocol descriptor for the email service you develop.
- Design and implement an email application using socket programming.
- Test your application.
You have been asked to design and develop an email application that will allow users to set up an account with the system, log in and retrieve their emails as well as sending emails to other users of the system. Users should also be able to log out of the system, which should close down the client program. The email application must communicate via TCP and should be able to handle an infinite number of concurrent client connections.
This concurrent functionality must be provided through the use of threading. Your email and user data must be maintained in data structures within your program for the duration of its execution, not externally (i.e. no database/file storage while it is running. You may store this data in a database or file prior to the application’s termination and read it in when the application starts up, but you may not use external storage other than this)
The email application will need to cater for the following fundamental application requirements:
- Setting up/Registering an account with the system and retaining user login details on the server.
- Logging in to the system (this should automatically display the user’s new received emails if there are any).
- Logging out of the system.
The email application will need to cater for the following fundamental mailing requirements:
- Sending an email to one (or more) users of the system.
- Retrieving all-new (unread) emails sent to the current user.
- Retrieving all email sent by the current user
- Retrieving all emails marked as spam for the current user
- Searching for a specific email sent by/to the current user
- Deleting a specific email sent by/to the current user
- Moving a specific email belonging to the current user into spam
- Deleting all spam email belonging to the current user
For this assignment you will need to provide:
- Protocol Descriptor 10%
- Client Interface 20%
- Application Design and Implementation 60%
- Testing 10%
You must design & specify a suitable protocol for your email service. This must include all standard protocol descriptor components and should detail all acceptable requests along with their appropriate responses. Finally, you must include sample exchanges for all requests.
You must design & develop a suitable interface for your client program. This should be a DOS command-line interface
Application Design and Implementation
You will need to consider:
- The functionality of the server:
- How is the server going to store users?
- How are you going to store the emails (if this is necessary)?
- How will your server handle interaction with multiple clients?
- A mutual exclusion will need to be considered if a common data object is being accessed concurrently by multiple clients (i.e. coordinate access to a shared resource).
- The functionality of the client:
- How is a client going to display information to the user?
- How is the client going to send and receive emails?
- What information will you need to exchange between the client and the server?
- Appropriate validation and error handling.
You are required to thoroughly test your project. You should include a test plan documenting test cases covered, along with the unit tests corresponding to these test cases.