Implement an internet resource retriever to act as a client

Assignment Help JAVA Programming
Reference no: EM131588473

Assignment: Client server java program to Run- Tutor-marked Exercise: Proxy Server

Overview

A proxy server is a network server that acts as a proxy for some other real server. Many websites with a firewall have a proxy server to provide a legitimate means to go through the network barrier. The proxy server thus is a mediator between the server and the clients. It forwards a client's request to the server and relays the server's reply to the original client. Therefore, to the client, the proxy looks like the server. To the real server, the proxy looks like a client.

For this assignment, you must implement an Internet resource retriever to act as a client and to make requests to a server, including the basic Web server you have implemented. The basic Web server's task is to deliver resources to the client. The client requests a particular resource by writing an HTTP GET (or similar) request. On receiving a legitimate request in the form of a URL path, the server should return the contents of the corresponding file so that the client can read the response from the server via the proxy server. When networking facilities are available, the basic Web server (or any other server) can be executed on one machine and the client can be executed on another to make requests to the server. When networking facilities are not available, both the basic Web server and the client may be executed on the same machine. The client may refer to the server host by the standard name localhost.

Requirements

Tutor-marked Exercise (TME) 1 requires that you develop three programs: one for a client, one for a basic Web server, and one for a proxy server.

A proxy server is a special-purpose HTTP server; it is the core application for this project. The proxy server has two socket connections. It "listens" for communication from clients through one and launches requests to specific Web servers through the other. In this exercise you should use a thread in the proxy server so that it is able to send and receive messages simultaneously to and from the server/client.

A basic Web server can deal with requests for resources from a client. It is necessary to have a Web server return messages to a client such as 404 - not found; 403 - bad request; etc., as appropriate. If the resource requested is available, which means that the resource can be found on the disk of the Web server, the Web server needs to read the resource and write the data to the socket. For example, a Web server may find an HTML file or a JPEG (image) file on its disk and transfer the data to the socket.

The client basically needs access to the function that allows the user to input the resource URL that identifies the resource s/he wants to access. However, the client has to access the resource by sending a request to the proxy server, and then the client must receive the resource from the proxy server. No matter what kind of data the client receives, the client only needs to print it on the screen. Note that where the response from a server is an HTML file, a typical Web browser will render it according to HTML semantics. This functionality is not considered in this exercise.

Note: Your tutor may use resource URLs other than those for the basic Web server (e.g., Java tutorial Web pages and public FTP files).

To test your basic Web server's function you can simply use an HTML file named testfile.html and a JPG file name testfile.jpg with Microsoft Internet Explorer or Mozilla Firefox.

Deliverables

Your assignment must be zipped into one file and uploaded using the Assignment Drop Box feature of Moodle. The file must include

• all source files.
• a complete test plan.

Reference no: EM131588473

Questions Cloud

Ethical issue or the abuse of privacy : 1. What is an example of either an ethical issue or the abuse of privacy? 2. What is an example of an anonymous communication that can harm others?
What is its accounts receivable turnover for the period : A company has net sales of $624,000 and average accounts receivable of $160,000. What is its accounts receivable turnover for the period
Discuss five states where slr continues to increase : What is the importance of UNIVISION in these issues? Discuss five states where SLR continues to increase?
Problem related to the speech spectrogram : The speech spectrogram has been used for analysis of speech characteristics for many years. Could such a method be used for recognition of speech patterns?
Implement an internet resource retriever to act as a client : For this assignment, you must implement an Internet resource retriever to act as a client and to make requests to a server.
Abuses inherent in the power of information : What are some potential problems and abuses inherent in the power of information?
Discuss vacation policy changes to be distributed to staff : Your supervisor has asked to you write a brief email on the vacation policy changes to be distributed to staff
Code of ethics for information professional : What constitutes a set of guidelines that will comprise a code of ethics for information professional?
What was the original cost of the asset : If accumulated depreciation on the sale date was $57,511 and a gain of $5,921 was recognized on the sale, what was the original cost of the asset

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write program using a switch statement that display polygon

Write a program using a switch statement that displays the name of a polygon with sides between 3 and 12 depending on the number entered by the user

  Instantiate a non-default orderprocessor object

Assignment you will need to instantiate (creat*) object(s) and invoke their instance methods to perform different tasks. The program is to keep track

  Display the total annual compensation

The application should ask the user to enter annual sales, and it should display the total annual compensation

  Declare five integer numbers

Declare five integer numbers, Adds the five integers and store the results in variable sum and Calculate the average of the five numbers

  Create an overloaded constructor that provides values

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and -).

  Write portions of java class that models a very simple clock

You will be writing portions of a Java class that models a very simple clock. You will also be provided with two different "front ends" that use this same class as a plug-in - a simple program that loops through the time for a full hour of time.

  Write a method, insertat that takes four parameters

Write a method, insertAt that takes four parameters

  Calculates the total annual compensation of a salesperson

calculates the total annual compensation of a salesperson

  Write a java program to simulate a pick lottery drawing

Write a Java program to simulate a pick 3, 4 or 5 lottery drawing. A lottery game of this type will draw values between 0 and 9. You should use the Math.Random() or the java.util.Random() class to generate the values in the lottery drawing

  Loops and pseudorandom numbers

CSE142—Computer Programming - define a class constant for the maximum number used in the guessing game - appropriate on this assignment and will result

  Inheriting from the jframe class

What is the difference between inheriting from the JFrame class and using a JFrame member variable?

  Modify the java source code file calculator

General description for homework: In this homework, you need to modify the java source code file Calculator.java in chap 9, so that it takes the input parameter in a different way.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd