Comp6461 -data communications computer networks lab


Data Communications & Computer Networks Lab Assignment

Introduction

In this assignment, you will implement a simple HTTP server application and use it with off-the-shelf HTTP clients (including httpc client, the result of Assignment #1). Precisely, we aim to build a simple remote file manager on top of the HTTP protocol in the server side. Before starting on this Lab, we encourage you to review the programming samples (provided with Assignment # 1) and the associated course materials.

Outline

The following is a summary of the main tasks of the Assignment:

1. Study-Review HTTP network protocol specifications (Server Side).

2. Build your HTTP server library that implements the basic specifications.

3. Develop a minimal file server on top of the HTTP server library.

4. (Optional) Enhance the file server application to support simultaneous multi-requests.

5. (Optional) Implement the support for Content-Type and Content-Disposition headers.

Objective

In the previous assignment, we focused on the client side of the HTTP protocol. We built a simple HTTP client command line and tested it on a real HTTP Servers (Web Servers). In this Lab, we concentrate on the server side of the HTTP protocol. Similarly to Assignment #1, the goal of the Lab is to develop your programming library that implements the basic functionalities of the HTTP server as will be described in the following sections.

The HTTP is a general-purpose protocol. However, it is mostly used in web servers to provide access to the web content. Apache HTTP Server is the most used implementation of HTTP protocol server side.

In our context, we use HTTP protocol to manage a remote file system through HTTP request and responses. Therefore, our goal is to build a file server application on top the developed HTTP server library.

Study and review HTTP Protocol -

In this step, you are asked to review HTTP protocol. In this context, you should focus on the server side features, since you are requested to implement some of them. We urge you to consider HTTP version 1.0 due to its simplicity and easy to implement. You can find the complete specifications of HTTP protocol version 1.0 in this web link HTTP[4]. Furthermore, you can make tests by sending requests and receiving HTTP server responses using the Telnet [3] command line. The pervious tests could show the typical HTTP responses for your testing requests.

Develop HTTP Server Library -

In this part, you are requested to develop your HTTP server library separately from application, to decouple the HTTP protocol specification from the intended end-application. Your HTTP library should be self-contained with a minimum dependency such as Socket library.

You are required to implement only a subset of the HTTP specifications. In essence, the library should include the features that can handle the requests from the httpc app of Assignment #1. To this end, you can test your library by implementing testing examples to check if it is working properly with client applications.

When you finish the testing examples you should check with the Lab Instructor.

Build a File Server Application Using Your HTTP Library -

In this task, you are required to make an end-application to the previous library functionalities. In other words, you should build a remote file server manager on top the library according to the following requirements:

1- GET / returns a list of the current files in the data directory. You can return different type format such as JSON, XML, plain text, HTML according to the Accept key of the header of the request. However, this is not mandatory; you can simply ignore the header value and make your server always returns the same output.

2- GET /foo returns the content of the file named foo in the data directory. If the content does not exist, you should return an appropriate status code (e.g. HTTP ERROR 404).

3- POST /bar should create or overwrite the file named bar in the data directory with the content of the body of the request. You can implement more options for the POST such as overwrite=true|false, but again this is optional.

Attachment:- Assignment File.rar

Request for Solution File

Ask an Expert for Answer!!
: Comp6461 -data communications computer networks lab
Reference No:- TGS02498501

Expected delivery within 24 Hours