Ifg computer science - foundation in computer science -


Assessment

Task 1

You are to research five topics:

- The use of stacks in computer science; explain why stacks are important and how a stack can be implemented either in Java or Python.
- Explain two ways in which threads can be created in Java.
- The use of queues in computer science and how they might be implemented in Java or Python.
- Give details of two or more Input/Output devices and evaluate their usefulness, giving technical data of interest.
- What is meant by a recursive function definition? Give an example and explain how the definition works.

The result of each piece of research should be carefully written up, giving diagrams where appropriate and citing references used. You should aim at giving depth in answering these questions.

Task 2

You are to design and implement a simple TCP client-server system that makes use of a simple proxy server.

672_figure.jpg

Figure 1 the Architecture of the Proposed System

Overview

This assessed coursework assignment is designed to give you an opportunity of further developing and understanding software, how to configure a concurrent application using three separate pieces of software in order to allow Internet communications. It provides you with the opportunity of designing, implementing and understanding what in effect are a complete concurrent system serving one or more useful purposes.

Objectives

The main objective is to use your proxy within an operational system - executing all three programs (client, proxy and remote) server together - and testing the system's overall functionality. You will need to decide how best this is to be done, and draw appropriate conclusions.

Specific Requirements

Firstly, the proxy should accept a TCP connection request from a TCP client on Port 8080. It should open a TCP connection with your chosen TCP server and connect the client with the server, and the server to the client using streams provided by the sockets created. It is required that TCP communications from client to (remote) server are concurrent, with respect to TCP communications in the opposite direction. Minimally you should aim at constructing a system enabling an echo client to send messages via the proxy to an echo TCP server and correctly receive a copy of the message sent. The second capability of your proxy to be established is whether a client (such as the GenericClient.java found on Moodle) or an ordinary Web browser can connect via your proxy to a well-known Web server and successfully display the homepage in html format remembering that an HTTP client and Web server may should be capable of communicating with one another concurrently.

Secondly, you should investigate further how proxy servers might be used. These uses should be valuable to internet users. This investigation should be at least 1000 words long and written up formally, providing sources referred to, and using the Harvard referencing system.

Coursework - Project

Task 1

You are to provide an in-depth overview of Peer-to-Peer (P2P) computing by describing two or more well-known systems explaining what their role is and how they work at the level of network protocol used. In particular, you should explain how a client joins (and leaves) a P2P system, and in particular their advantages over normal client-server computing systems. You should address some of the professional, business and legal issues arising from the use of P2P networks by referring to the history of P2P networking and computer Systems and any relevant legislation. Finally, you should consider whether Skype is a P2P system, giving reasons for your answer.

Background Reading for Task 1
There is plenty of documentation and a range of short articles available on the Internet. However, a possible starting point might be the slides from Keith Ross and Dan Rubenstein "P2P Systems" (a copy is available on Moodle). These were written a while ago, but contain much essential background, and provide coverage of some of the main P2P systems in the past. Most of the material is quite straightforward, but some advanced material is covered. There is a bibliography at the end of the slides.

Task 2
You are to consider the problem of how a file can be distributed using UDP programming techniques. A file ("gutenberg.txt") is to be copied over the Internet from a host server to a client. This file is available on Moodle. The way in which the transfer takes places is by the server opening the file after it receives a request from the client. It then sends the file line-by-line.

You should initially set up the system (consisting of the server and client) using the two skeleton programs provided. Ultimately, data transmission should be designed to use a stop-and-wait protocol, i.e. on successful receipt of a line of text, the client will send an ACK, which implicitly is a request for the next line. You should attempt to add additional code to implement the simplest form of the protocol and to explain additions you would make to the code needed.

You may additionally wish to consider the case of the server not receiving an ACK back from the client after transmission of a line of code, and to suggest a reasonable action that should be taken by the sender. Why might and ACK not be received?

Instructions
Skeleton code for both client and server is provided as well as the file to be transferred. As the first step, you should provide a system that successfully transfers the file by executing the two programs in Eclipse, and give an explanation of the main features of the code. You should provide evidence of the file having been transferred.

You should then explain how the file would be transferred in principle by using the simplest version of stop-and-wait.

You should discuss the problem (or problems) that the stop-and-wait protocol are designed to solve, and outline one or more increasingly more elaborate steps to address corruption of data, or missing ACKs and data packets.

Finally, you should state what the protocol's main disadvantage is providing an explanation, and suggest how the protocol could make more efficient use of bandwidth by pipelining the protocol.

The client and server can both be executed using localhost ("127.0.0.1") and by using different UDP ports.

Reading for Task 2

The essential reading is contained in the tutorial material for UDP programming, and in particular the documentation on UDP Servers and clients. You may wish to consult the FileCopy Program the uses streams to read from and write to a file on a hard disk. You will need to remind yourself of socket creation in UDP, and how to use its relevant methods to read data from and write data to a communication partner.

Attachment:- Coursework.zip

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Ifg computer science - foundation in computer science -
Reference No:- TGS02870871

Expected delivery within 24 Hours