ECS 152A: Computer Networks
Collaborative Downloader on Android Platform
Please read all sections of this document before you begin coding.
In this project, you will develop a TCP based peer-to-peer architecture that allows several
phones to collaboratively download a file from the Internet. For the sake of simplicity, we
assume that one phone acts like a 'peer tracker', and all other phones are aware of its IP
address and port in use before hand. All other clients will join the tracker phone first and
the tracker phone will dispatch jobs among all the phones.
You will develop a tracker app, and a peer app. The two kind of app should be able to
communicate through a protocol you designed which enable them to collaborate.
Your goal is to make sure that tracker got the full file.
The goals of this project are to introduce you to protocol design and peer-to-peer
architecture. Also you will utilize some advanced techniques in Android platform.
Please work on this project individually. Code sharing, and group work are forbidden.
Offenders will be dealt with appropriately (see the policy information sheet from the
class home page). Source code will be compared using MOSS.
You are required to make sure that your programs compile on machines in the computer
lab. Programs suffering compilation errors when tested will earn no credit.
Please indent and document your code. Use meaningful names for variables and follow
other style guidelines that enhance the clarity of your code.
Make a clear design before dive into coding, you will be asked to hand in a protocol
design (preferably with drawing illustrations).
You will develop both tracker app and peer app. Put the two apps into two separate
projects. The two apps should be able to run in separate emulator instances and
communicated with each other.
Tracker Main UI: User should be able to specify the tracker port and the URL of the file
to download. A user should start the tracker from this UI.
Tracker List UI: Within this UI, the tracker should list the IP addresses of all the peers
that have joined this tracker. User should be able to start the download from here.
Tracker job dispatch: The tracker should inform each peer which part of the file to
download (file offset) based on the total size of the file. Note: The tracker is also a peer,
so it should be able to participate in downloading a part of the file. The tracker and peers
should communicate through a protocol to synchronize.
Tracker file assembly: The tracker will ask for the parts that the peers has downloaded,
and assemble the parts together.
Peer Main UI: User should be able to enter the IP address and port number of the tracker
here, and join the tracker.
Peer Status UI: After joining the tracker, peer should be able to display its status here.
(waiting, downloading, finished, etc.) A progress bar will give you bonus points.
For those of you who feel particularly motivated to improve your server programming
skills, this section provides some ideas for extensions to the main problem. Additional
credit will be given, and you might find them fun. (At most 20 points)
Quote Control: Provide the option how much data a peer would download.
Share!: Make sure that everybody gets the full file.
Peer discovery: Assume all the peers are in the same sub-net, could you get rid of the
Progress bar on both peer and tracker showing individual progress and overall progress
Security: Encrypt the communication and authenticate each peer with public/private key,
or just simple passcode.
Anything fun! Use your imagination!
The maximum for your project is 120 points.(credit subject to our discretion.)
If you used Eclipse, please submit your workspace folder with only this one project
inside. (You can make a copy of your workspace and remove other projects to submit)
Otherwise submit your project folder with all the source code and build file.
Create a file README containing two parts.
Part 1: Implementation Log This part should briefly describe and justify your design
and implementation decisions, including all message formats and details of your data
structures. Also discuss any other interesting aspects of your implementation. As
always, you should acknowledge the authors if you copied sections of your code from
elsewhere (even if you modified it later).
Part 2: Protocol Analysis Describe how your protocol would work in general and
give one scenario to illustrate. (Draw a picture would clear thing up)
Compress your folder and handin using my.ucdavis.edu. Do not be late.
This project is inspired by G. Ananthanarayanan, etc., "COMBINE: leveraging the power
of wireless peers through collaborative downloading," ACM MobiSys 2007