Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M92397187
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Java

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

  • 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