Slow internet connection is frustrating. I was thinking of a way to tackle this.
What it does
When you try to download a file. It sends a request to a server. Others devices keeping polling the server to check if there is a download request. The server partitions the file based on the internet speed these devices have and each device downloads its share.
Assuming that these devices come in same LAN frequently, user can instruct the application to send the file to the designated user where it will be merged.
How I built it
I built a Jetty server and made REST APIs so that devices can communicate with it. A device hits an API for informing the server of the URL. Server maintains a queue of such requests. Then each device informs the server of the quality of its internet connection and then server partitions the file based on this info.
After each device downloads its share, it notifies the server and when all are done the request is ejected.
Challenges I ran into
Communication between client and server. I switched from sockets to polling for some part to get to a working solution.
Accomplishments that I'm proud of
Building all these things were challenging and fun. I was able to reach the point where each device downloads its share of file. That is far ahead of what I though I'll reach.
What I learned
How to manipulate the code to synchronize actions. Establishing a system of multiple clients and a server and their communication.
What's next for Buddy Download
First, I'll finish it to the point I thought. Since apps have a push notification system, communication among clients and server will be much easier and convenient for the user. So, an app for it would be awesome!!