PA1 - CS 453 : Networks - Fall 2009 Programming Assignment...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 453 : Networks - Fall 2009 Programming Assignment 1 Instructor : V. Arun Assigned : Sep 30, 2009 Due: Oct 18, 2009 This assignment is designed to: 1) introduce you to network programming using sockets, and 2) implement a BitTorrent-like program to download files and compare it with a traditional client/server HTTP-like approach. Your goal is to write a network program, referred to as the client , that downloads an image-file from a tracker . The client must implement two options: 1. Request the tracker for the entire file similar to HTTP. 2. Request the tracker for addresses of other peers that possess parts of the file, called blocks , and download these blocks from different peers. Your client needs to download the image as fast as possible and display it on the screen . Note that the first option will not yield the fastest download as each server services requests at a specific rate and relying on only one server to get the entire file may yield a poor download rate. The rest of this document describes 1) the message format for both protocol options, 2) the detailed architecture of the second option, 3) allowed strategies to improve download speed and tactics that will be considered cheating. 0. TRACKER The tracker is running at: and You may use exactly one of the two trackers at any time. We are supporting two trackers only for fault-tolerance. 1. CLIENT/SERVER In the client/server option, the client requests the server for the entire file using TCP similar to HTTP. The server is running on & . File request format: The client sends a request in the following format to the server to download filename . The filename to use for this assignment is Redsox.jpg GET filename
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
In our case, the client must send the request as GET Redsox.jpg File response format : The response to the file is in the following format: <offset-of-block>(4 bytes) <block-size>(4 bytes) <Data> In the client/server option, the entire file is sent as one block, so the first field is 0, the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/06/2011.

Page1 / 5

PA1 - CS 453 : Networks - Fall 2009 Programming Assignment...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online