Windows NT Systems Programming: Spring 2000
[ Home | Syllabus | Course Notes | Assignments | Search]
Assignment 3: Student Record
Multi-Client Server
Description: You will modify the
student records program (ex16b) so that the student record list is kept on a server. The
client will have the same user interface as Ex16b, but will store and retrieve student
records from the server. This server can be accessed by multiple clients simultaneously.
Therefore you need to be concerned about potential synchronization conflicts.
You can work on this project in a team of 2 if you
choose. The requirements for a team project are different in that the server is required
to have a user interface (see details below).
Due: March 24 (Friday).
FUNCTIONAL REQUIREMENTS:
- Client program should have the same interface as Ex16b. (which means that file save/open
is NOT enabled even though it is there in the menu).
- Server keeps the student record list NOT the document object in the client. The document
object needs to keep at most one student record.
The document object will therefore be more like that in EX16a, although it needs to be
able to communicate with the server to save/retrieve student records.
- Server must handle multiple clients simultaneously.
- Synchronization is to be handled as follows.
- Inserting a new student record is always done at the end of the list.
Multiple clients can insert new records at the same time (subject to reasonable
synchronization constraints).
- No client can delete a student record which is being viewed by another client.
A request to delete a record being viewed by another client will be denied.
- There is no editing of an existing student record.
Therefore, other than inserting a new record, there are no writers.
- The list may change while a client is searching through it with new items added and
existing ones deleted (as long as it is not the one the client is viewing). Therefore the
indications that you are at the beginning or end of the list are not necessarily accurate.
Because the list may be changed by other clients while it is being viewed and because
these changes will not be broadcast to all clients, you chould not disable the
home/end/prev/next menu items/toolbar.
- The "home" and "end" menu/toolbar actions will take the client to
the current home/end at the time the clients request reaches the server.
However, after going to the end, new records can be added which change the end. The client
does not have to be notified of this change. Thus it is possible that retrieving the next
record after going to the end will retrieve a new record.
In addition, records after the current record being viewed may be deleted making the
current record the end of the list. Again the client is not notified that the current
record is at the end. However if the client tries to retrieve the next record, a message
box saying that this is the last record will be displayed and the current record will stay
the same.
The following rules are intended to avoid the multiple readers/writers problem and thus
simplify synchronization.
- The server must guarantee the integrity of the student record list using whatever
synchronization you deem appropriate.
- Your server should display informational messages whenever a new client is
connected/disconnected. It should display all client actions (insert record, delete,
retrieve) with the name of the student involved.
IMPLEMENTATION (NON-FUNCTIONAL) REQUIREMENTS:
- Your server must start a new thread for each client.
- You should submit a testing report which describes the tests you used to convince
yourself that the system was working and their results.
HINTS:
Additional Requirements for a Team Assignment
- Clients must "login" before accessing the server.
- The server must support a GUI with a list of the currently logged in clients and their
status as follows:
- list of all actions (insert, delete, retrieve) including student name for each action.
- Clicking on a client in the client list will bring up this list of actions.
- Server should keep a log of all clients who have previously logged in that session.
- Clients can log off or quit which should also log the client off.
Copyright chris wild 1999/2000.
For problems or questions regarding this web contact [Dr.
Wild].
Last updated: March 14, 2000.