CS433/533 Homework Assignment Three: Network Servers and Server Performance Evaluation

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

This assignment gives you a chance to become familiar with concurrent network clients, servers, covering topics including threads, synchronization, wait/notify
(monitor), asynchronous I/O, and benchmarking.
Due:
Check point [5 points] (Part 1 and Part 2 code): 10 PM on Oct. 11
All [95 points]: 8:00 PM, Friday, Oct. 18, 2013 by uploading to classes
Protocol
The server that we will design is a simplified version of HTTP 1.0. A server is started with a document directory . The most basic application message,
encoded in ASCII, from the client to the server is:
GET HTTP/1.0
CRLF
where CRLF is carriage return and line feed, representing an empty line. This request asks for the file stored at location /.
For example, if =/tmp/mydoc, and is /file1.html, the server will return the file /tmp/mydoc/file1.html, if it exists.
The basic reply message from the server to the client, encoded in ASCII, is:
HTTP/1.0
Date:
Server:
Content-Type: text/html
Content-Length:
CRLF

CRLF again represents an empty line. If the file is found and readable, the returned is 200 and you can give a message such as OK. Otherwise, please
give an error code of 400. If you are curious about HTTP error codes, you can see http://www.ietf.org/rfc/rfc1945.txt. You can use Java File class to obtain file size.
Part 1: Simple Client
Your test client should be multithreaded. The client can generate test requests to the server with the following command line:
%java SHTTPTestClient -server -port -parallel <# of threads> -files -T