CNCO3002 Advanced Computer Communications Assignment

Assignment Help Computer Networking
Reference no: EM132387263

CNCO3002 Advanced Computer Communications

Discipline of Computing - Curtin University, Australia

Assignment - My Proxy Server

Objective - The objective of this network programming assignment is to develop three complementary programs: Client, Proxy Server and Server, which implement a simple application program, called My Proxy Server (MPS). Note that the idea behind MPS is the Web Proxy Server of HTTP/1.1. However, MPS does not follow the standard for Web Proxy Server of HTTP/1.1 as specified in RFC 2616.

Without a Proxy Server, when a Client C requests for a file X stored in a Server S, the request is sent directly from C to S. Server S then processes the request and sends the requested file X directly to Client C.

To improve performance, a Proxy Server P is inserted between Client C and Server S. As shown in Figure 1, MPS contains three main entities: one Proxy Server, a set of Servers, and a set of Clients; the figure shows only three of the Servers and one of the Clients. The Proxy Server serves requests from each Client on behalf of each actual Server. The Proxy contains disk storage to keep / cache the recently requested files by the Clients. Let the cached files be in directory my_cache of the Proxy Server. Initially, my_cache is empty.

Requirements -

1) Write a pre-threaded TCP concurrent Proxy Server program P that is waiting for some Client C at its port L. Use one of your assigned port numbers for L. You also need to write one program to implement Client C, and another program to implement Server S. Each concurrent Server S is waiting for clients at port K. Use one of your assigned port numbers for K. Any server design, e.g., pre-threaded, pre-forked, etc. for the Server is acceptable.

2) For each connection from Client C, Proxy P uses one available thread from its pool of threads, e.g., P-C, which will serve Client C. The client shows a prompt Client > when waiting for a valid command from its user, e.g., you or the grader.

3) Each Proxy P-C recognizes the following set of commands from Client C (not case sensitive).

a) LOOK cache

e.g., Client > LOOK cache

Given the user's command, Client C sends the command to P-C. Receiving the command, P-C sends the content of cache table to Client C. P-C then waits for the next request from Client C. Receiving the content of cache_table, Client C shows the content on its screen, and shows prompt Client > to wait for another user command. You can decide the format of the printed cache_table on the screen, e.g.,

File1

Location: 137.7.5.22, 51000

Cached time: Fri Jan 13 10:27:52 2017

Last requested time: Fri Jan 13 14:27:52 2017

Total requests: 5

File2

Location: 137.7.5.23, 50002

Cached time: Fri Jan 13 13:27:52 2017

Last requested time: Sat Jan 14 1:30:43 2017

Total requests: 2

File3

Location: 137.7.5.22, 51000

Cached time: Fri Jan 13 12:17:22 2017

Last requested time: Fri Jan 13 15:47:12 2017

Total requests: 1

File4

Location: 137.7.5.24, 50001

Cached time: Fri Jan 13 10:29:52 2017

Last requested time: Fri Jan 13 17:47:12 2017

Total requests: 1

b) GET Server Port File_name

e.g., Client > GET Server1 51000 File1

Client C wants to download File_name (e.g., File1) from Server (in dotted decimal notation) with port number Port. Client C sends the command to Proxy P-C. Receiving the request, Proxy P-C checks cache_table to see if there is a valid File_name in my_cache.

(i) If File_name in my_cache is valid, Proxy P-C sends File_name to Client C, updates the Last requested time with the current time, and increases Total request by one. Proxy P-C then waits for the next request from Client C.

(ii) If File_name has not been cached or it is not valid, Proxy P-C creates a TCP connection to Server S (e.g., Server1) that is listening at Port K to request for File_name. For K, use your assigned port number. Receiving the request, Server S sends File_name to Proxy P-C, closes the connection, and waits for another TCP connection. Receiving File_name, Proxy P-C sends it to Client C, stores / replaces File_name in my_cache, and adds information about File_name in cache_table, e.g., row 4 in the example cache_table for File4. Note that Proxy P- C replaces File_name in my_cache if there is an invalid copy of File_name in my_cache. Proxy P-C then waits for the next request from Client C.

Receiving File_name, Client C stores File_name in its directory download-file, prints a message to its screen (e.g., "File_name is downloaded"), and shows prompt Client > to wait for another user command.

c) DELETE Server Port File_name

e.g., Client > DELETE Server1 51000 File1

The user of Client C wants Server S to delete the File_name (e.g., Server1 listening at Port 51000 to delete File1). Client C sends the command to Proxy P-C.

Receiving the command, Proxy P-C creates a TCP connection to Server S (e.g., Server1) that is listening at Port K, and forwards the deletion message to Server S, and waits for a reply from Server S. Receiving the deletion message, Server S checks if File_name is in its my_file. If yes, Server S deletes File_name from my_file, and sends a success message (e.g., "OK; File1 has been deleted") to Proxy P-C and closes the connection with Proxy P-C. Otherwise, it sends a failure message (e.g., "File1 does not exist") and closes the connection with Proxy P-C. Receiving the message from Server S, Proxy P-C forwards the message to Client C. Proxy P-C also checks if there is an entry about File_name in its cache_table. If so, Proxy P-C deletes the entry, and removes File_name from my_cache. Then, Proxy P-C waits for the next request from Client C. Receiving the message from Proxy P-C, Client C prints the result of its DELETE command, e.g.,

Deleted File1

Location: 134.7.7.34, 51000

Then, Client C shows prompt Client > to wait for another user command.

d) EXIT

e.g., Client > exit

Client C wants to exit MPS. Receiving the request, Proxy P-C sends a "good bye message" to Client C, and terminates the connection. Receiving the message, Client C shows the message on its screen, and then terminates the connection, e.g.,

Good bye Client (IP address, Port number). Thank you for using MPS!

In the example, IP address and Port number are respectively the address and port number of Client C.

4) The Proxy Server, Server, and Client must check for some possible invalid commands and errors, e.g., attempt to download a non-existing file, etc., and address them properly.

5) Each Proxy Server P-C terminates connection with Client C if it does not receive any command within x seconds. Set the value of x when you run the Proxy Server program, i.e., as part of the command line argument.

6) Your program must address all necessary mutual exclusion.

7) How to test your programs? You first run your Proxy Server program. Then, you run one or more Servers. Note that you need to create five files in each Server. Finally you run one or more clients to connect to the Proxy Server, and test each command.

Your assignment report should include:

A signed statement that the assignment is your own work, which includes the words "Advanced Computer Communications Assignment", and your name in the form: family, other names. Your name should be as recorded in the student database.

Software solution of your assignment that includes (i) all source code for the programs with proper in-line and header documentation. Use proper indentation so that your code can be easily read. Make sure that you use meaningful variable names, and delete all unnecessary comments that you created while debugging your program; and (ii) readme file that, among others, explains how to compile your program and how to run the program.

Detailed discussion on how any mutual exclusion / synchronization is achieved and what threads access the shared resources.

Description of any cases for which your program is not working correctly or how you test your program that make you believe it works perfectly.

Sample input and output for the program.

Attachment:- Advanced Computer Communications Assignment File.rar

Reference no: EM132387263

Questions Cloud

Define conclusions about thinking of leadership scholars : What are your conclusions about the thinking of these leadership scholars as expressed in the table and with regard to additional sources you may elect.
Prepare a presentation comparing global companies : Prepare a PowerPoint presentation comparing and contrasting 2 global companies of your choice. What is their source of competitive advantage
Monetary and Fiscal Policy Problem : What is your conclusion, should policymakers use the monetary and or fiscal policy to stimulate aggregate demand? Explain briefly
Research a current issue of state and local policies : Question: Research a current issue of state and local policies such as transgenders and public restrooms as it pertains to morality
CNCO3002 Advanced Computer Communications Assignment : CNCO3002 Advanced Computer Communications Assignment Help and Solution, Curtin University, Australia, Assignment - My Proxy Server
Security configuration and analysis : A comparison of existing security controls and settings with one or more baselines helps to validate the correctness of security controls.
Validate the correctness of security controls : A comparison of existing security controls and settings with one or more baselines helps to validate the correctness of security controls.
Two articles with incident when physical security failed : For this assignment, you will search the Internet and find a minimum of two articles with an incident when physical security failed.
About the threats and potential attacks of organization : From the information governance subject, I learned about the threats and potential attacks of an organization in a broadway.

Reviews

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

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