Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

Objectives -

The object of this exercise is to write a multi-threaded HTTP server, showing both your understanding of the networking API and also of the programming techniques required to leverage that API effectively.

There are three small exercises which do not count for marks directly, but which are intended to help you prepare for the main element of the assignment.  You do not have to do these exercises, but you are assumed to have a full understanding of their content. 

Environment and tooling

These exercises should all be written in (preferably) C or (if you cannot program in C) Java.  They should all run, unmodified, on the school's Linux teaching systems.  If you develop on another platform, you should confirm that your code builds and runs on the school Linux machines. 

Your program should access the socket interface directly.  For C this is straightforward; for Java, you should use java.net.Socket, not one of the more abstract networking classes.

If you work in Java, your program should run from the command line using the java command; it is not sufficient to submit an Eclipse project and expect the marker to figure out how to run it.   You should include a Makefile whose all target uses the javac command to compile your code.

If you work in C, there should be a Makefile whose all target builds all the required programs.

Preparatory Exercises

Write a program which accepts a single incoming connection, using listen() and accept(), and displays all received data on the screen.  You can test this program using telnet or netcat.  Once you have completed this task, swap your code with a colleague and have them test it; they should give you a one or two paragraph report on its function and the code itself.

Extend this program so that it will accept multiple connections, in parallel, and display all received traffic on the screen.  This will involve the use of pthreads, for C, or you can if you wish use fork().   For Java, you will need to use implements Runnable, extends Thread or some other threading mechanism.  Again, have a colleague (ideally a different one) evaluate your code.

Extend this program so that instead of just displaying what is sent to it, it instead parses an HTTP request and request header (you will need to read RFC 2616 for the full details) and displays the broken-out fields on the screen.  You should be able to test this with wget or curl: the client will show errors when your program closes the connection without returning any results, but your program should produce correct output on the screen.  Again, have a colleague (and, again, a different one) evaluate your code.

If requested I can set Canvas up to handle this peer feedback, but I would prefer you to actually meet and talk to people!

Main Exercise

You should write a web server which interacts correctly with a web browser, serving content from either the file system or a small database. It should provide an index page when visited with a null URI, and then correctly handle subsequent requests arises from clicking on the items in the index.

The program should be correctly multi-threaded, and handle multiple clients connecting rapidly in parallel.

Attachment:- Assignment File.rar

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M92493563
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Computer Network & Security

Assignment descriptionproject scope a typical network

Assignment Description Project Scope: A typical network layout diagram of a firm is given below for illustrative purposes only. The service requirements are enclosed. Figure. Network layout of a firm Service requirements ...

Security risk assessment executive summarya detailed

SECURITY RISK ASSESSMENT Executive Summary A detailed Information security risk assessment was carried out on Fiji Directories Limited (FDL) during October 15th 2018 to October 24th 2018. FDL, an ATH group company, is a ...

Question suppose you wish encrypt the message beyonce using

Question : Suppose you wish encrypt the message BEYONCE using the one-time pad with the key RIHANNA (a) Encode to this message and the key as bits. (b) Encrypt with the one-time pad using XOR. What is the resulting ciphe ...

Topic is impacts of data breaches the report will divide in

Topic is "Impacts of data breaches". the report will divide in to 5 section which is : "" 1-Abstract: comprehensive overview of the report in 150 to 200 words. 2- Introduction: Describe the topic and its issue in 250 to ...

Question what is active threat in terms of network security

Question: What is active threat in terms of network security? Provide an example. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA format. Note: minimum 300 wor ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Autonomous consumptionnbsp 660marginal propensity to

Autonomous consumption  = 660 Marginal propensity to consume  = 0.8 Autonomous taxation  = 200 Income tax rate =  0.2 Planned investment  = 500 Government spending  = 500 Autonomous net exports  = 300 NX  = 0.04 Calculat ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Suppose there is no inflation and an insurance company

Suppose there is no inflation and an insurance company offers a contract that would pay $500,000 with certainty 50 years from now. What is the most that this contract would be worth today if: 1. The rate of interest is 7 ...

Case study network design for ezy-booksezy-books is a

Case Study: Network Design for EZY-Books EZY-Books is a specialised publisher for customised book publication services based in Brisbane. The company has recently purchased a two-story building in a Brisbane suburb as it ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As