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 Make file 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.

Extra marks are available for implementing any of compression, encryption with SSL or the ability to fetch byte-ranges of resources.

You should document your code at a high level (at most three pages) and provide a short diary (again, at most three pages) describing your experiences and the challenges you encountered.  You should also write briefly about what you would do differently were you to repeat the exercise.

Attachment:- Assignment file.rar

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M92493534
  • Price:- $80

Guranteed 48 Hours Delivery, In Price:- $80

Have any Question?


Related Questions in Computer Network & Security

How would you explain the concept of a quality adjusted

How would you explain the concept of a quality adjusted life year? When is it appropriate to use "QALYs" instead of simply improved life expectancy as the outcome measure in an economic evaluation?

Prof gs farmer friend claims that aliens made crop circles

Prof G's farmer friend claims that aliens made crop circles in his farm. Using economic theory, prove his farmer friend wrong.

Below are the supply and demand schedules for fresh coffee

Below are the supply and demand schedules for fresh coffee in Vancouver: Price ($/cup) Quantity Demanded  (cups/day) Quantity Supplied (cups/day) 1 440 330 2 415 360 3 390 390 4 365 420 5 340 450 6 315 480 7 290 510 a. W ...

Assignment -need project made by packet truce follow the

Assignment - Need project made by packet Truce. Follow the given report and please don't make the project big and video will describe full project in details and with configuration. Project - Design and Implementation of ...

Suppose that serendipity bank has excess reserves of 12000

Suppose that Serendipity Bank has excess reserves of $12,000 and check able deposits of $150,000. If the reserve ratio is 20 percent, what is the size of the bank's actual reserves?

Overviewthis assignment has three major aims- to help

Overview This assignment has three major aims: - To help students gain good understanding of theoretical and practical material. - To encourage students to use content analysis summaries to prepare for tests, examination ...

Metasoft ltd is a software development company which works

MetaSoft Ltd is a software development company which works across Australia and New Zealand. The company is considering the following strategic proposal: - They plan to close down the Melbourne data centre rather than up ...

Wireless networks and security assignment - design and

Wireless Networks and Security Assignment - Design and implementation of secure enterprise wireless network Purpose of the assessment - The purpose of this assignment is to design and implement a secure enterprise wirele ...

Question do some research and find a case of cyber

Question : Do some research and find a case of cyber harassment or cyberbullying. Explain the case, and discuss the relevant theories of criminal justice associated with the perpetrator(s). Your response should be a mini ...

Objectivesthis assessment item relates to the unit learning

Objective(s) This assessment item relates to the unit learning outcomes as in the unit descriptors. This checks your understanding about configuring and troubleshooting medium-size networks. PART-1 IP Addressing: 1. Subn ...

  • 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