Skip to content

We introduced a client program allowing users to cooperatively download pieces of large files and then combine them over local network.

Notifications You must be signed in to change notification settings

AmrSaleh/Cooperative-Download-Manager

Repository files navigation

Cooperative-Download-Manager

Cooperative downloading over multiple clients

We introduced a client program allowing users to cooperatively download pieces of large files and then combine them over local network.

Team members by alphabetical order

  • Ahmed Abdelwahed Elkhatib
  • Abdelrahman Ali Morgan
  • Amr Saleh Mohamed Aly

Motivation

Usually we want to cooperatively download large files that we will use instead of a single person downloading it and suffering from the slow internet connection. If we could split the large files and download these chunks simultaneously from different devices, then we would download the file much faster and then we could share it together using local network, which is much faster than the broadband connection.

Project Overview

The solution we propose aims to overcome the problem of slow broadband connections and the fact that people in the same community circle, like friends and colleagues, usually would like to download the same files. So, instead of a single person downloading a massive file and suffering through his connection and wasting a lot of time, a group of friends can cooperatively download the needed file as chunks simultaneously; saving a whole lot of time. Our program manages the coordination and the file splitting into chunks, and most of all, keeping all the clients synchronized. It also facilitates merging the file at the end.

System Architecture

Our proposed system consists of

  • Downloader application present on clients' machines. Each client coordinates through the dedicated server with other clients; deciding which parts of the desired file to download.
  • A web server coordinator This server holds the information that allows each client to dynamically request and download available parts of files that haven't been downloaded yet. This mainly helps keep the coordination process smooth and dynamic between clients.

Use Case

The first client uses the application to download a file from a server. The application collects the required information about the file (e.g. the file size, address, etc.) then sends this information to the coordinator server. The coordinator server divides the file into parts and assigns some parts to the first client to download. Other clients use the application to contact the coordinator server and request to contribute to downloading the file. The coordinator server assigns some parts of the file to the newly joined clients for downloading. When a client finishes downloading a part, it requests another one from the server. The server replies with a part that is not downloaded by any client. At the end, all file parts are downloaded once among all the contributed clients. Finally, those clients join a local network, which is supposedly faster than broadband, and use the application to merge all scattered parts of the file into one whole copy at each machine.

Diagram

alt text

Flowchart

alt text

Assumptions

  • Files can be requested as chunks from server.
  • Clients will join a local network to merge the file.
  • We used a UDP broadcast method to exchange the packets over the local network. Unfortunately UDP packets have limited packet size and this caused the file packets to be small which may cause somewhat an overhead.

Results

  • We successfully managed to download chunks of a file in parallel.
  • Also, we managed to merge those chunks and recreate the original file.
  • We created a coordinator server with the responsibility of organizing the clients when issuing a new download request and making a new download session for it.
  • Clients then can register themselves as participants in the session and request parts to download, periodically.
  • The coordinator successfully communicated with the clients and responded with the chunks to be downloaded by each client.
  • When all the chunks are downloaded and confirmed to the coordinator he then informs the clients that the download is finished and that they can join a local network to merge their files.
  • We managed to make clients communicate locally and discover each other.
  • Then they decide automatically on which packets to be broadcasted based on the control packets exchanged between them.
  • We successfully tested the local client discovery and file chunks exchange process then we merged the resulting chunks and produced a working copy of the originally downloaded file at each client.

Video demonstration

Commentary is in Arabic with English subtitles.

Cooperative Download Manager - merging file parts over local network

Cooperative Download Manager - downloading file as chunks

References

About

We introduced a client program allowing users to cooperatively download pieces of large files and then combine them over local network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages