{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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: 128.119.245.8 and 128.119.41.217. 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 128.119.245.8:18765 & 128.119.41.217:18765 . 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
Image of page 1

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

View Full Document Right 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>
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern