E&CE 454
Distributed & Network Centric Computing
Project 1 Information, ECE454 Spring 2001
- This assignment encompasses three independent parts. You will have to
implement a simple client-server application using Sun's RPC
implementation, Unix Internet domain sockets and Java sockets. The
requirements for each implementation are detailed below. The deadline
is June 5, 2000 at noon.
- [1] Using Sun's RPCs you have to implement a remote sorting client-server
application.
The client calls the server's sorting procedure with two
arguments: the name of the file containing the data to be sorted and an
integer specifying if normal or reverse sorting is desired. The server will
perform the sorting and it will return a string specifying the name of the
newly created file containing the sorted data. For simplicity, you may
consider that the file contains strings of maximum 40 characters, each string
separated by a new-line character. You may also consider that a sorting option
of -1 means reverse sorting and a value of 1 means normal sorting. The server
should check if the request is valid, i.e. if the file specified in the
request exists on the server machine and the sorting option is valid. If the
request is invalid, then the "INVALID REQUEST" string should be returned to the
client. Whatever is the result, it will be displayed by the client.
At start-up the server will register with the portmapper and then it will
wait for requests. You have to ensure that the server can be shut down
properly, i.e. it will unregister with the portmapper.Details
will be given during the tutorial hours.
The client will be started with two arguments: the name of the server
machine and the transport protocol used to perform the RPC calls (TCP or
UDP).
Your executables should be called client_sort for the client program and
server_sort for the server.
- [2] Using Unix Internet domain sockets you have to implement a simple echo
client-server application.
The client reads the user's input and it sends it to the server which
will display it and echo it back to the client. You will consider that the
user input is sent to the server only when the new-line character is detected
in the input stream, i.e. the echo server will operate on a line by line basis.
The server should be implemented as a concurrent server. It will be
started with one argument: the port number of the service. The client and
server will use TCP at the transport layer.
The client will be started with two arguments: the host name of the machine
where the server is running and the port number of the service.
Additionally, you have to ensure that the client can send out-of-band data
that will turn off the echo, i.e. the server will only display the lines sent
by the client, without echoing them back.
The connection will be terminated when the "STOP" string will be
entered as a separate line of the user input.
Your executables should be called client_echo for the client program and
server_echo for the server.
- [3] Using Java sockets you have to implement the same system as for part 2.
- The project will be conducted in groups of two students per group.
- Common requirements
For full marks, your implementation has to consider possible error conditions
that may appear. Details will be given at the tutorial hours.
- Submission
You have to submit electronically everything that is needed to build your
applications.
The submission will be in the form of one .tar.gz file that will expand to
three subdirectories called rpc, unix_socket and java_socket with the
appropriate files in each directory. Each directory should also contain a
README file that specifies how to build your application.
No paper submission is required. However, there must be a README file and
sufficient documentation in your source code.
Contact Info:
kostas@swen.uwaterloo.ca
fpoon@swen.uwaterloo.ca
kycheung@swen.uwaterloo.ca