Code Monkey home page Code Monkey logo

group-share's Introduction

group-share

An algorithm and architecture to efficiently share files in group

We could say SHAREIT is one of the best applications in the play store. It provides ultra easy UI to share files with friends. Have a group? No problem!! SHAREIT provides group share. Hold your horses!! The problem arises if a group is a bit big. The architecture of the group share in the former is not polished enough to provide efficient file transfer within a group. Lets brief into constraints,

  1. Group size constraint
  2. Networking constraint

Group size constraint:
SHAREIT has limited the max group size to be 5. Moreover, it uses hotspot/WIFI to transfer the file, every device has the number of connection limitations too.

Networking constraint:
It makes every node and the server connected in a single network. So, only one node can receive the file at a time frame, because of collision avoidance. This is similar to, single processor system handling multiple processes.

Theoretically, these points prove the inefficiency of SHAREIT group share architecture. We tested practically too, the transfer takes place at snail pace.


Idea 1

The concept of seeding is simply great, which made torrents a big thing. Let’s use the same concept with a bit change in network architecture in group share.

Initially, the sender gets the hotspot hardware address of the receivers(part to be planned). Once, the request is sent receivers switch on their hotspots and sender switch on its wifi. The first sender connects with the 1st receiver and sends the file. Once the file is sent, the sender sends half of the hotspot hardware addresses collected to the receiver. Now, the receiver becomes a sender and start seeding. At the same time, the original sender sends the file to some other receiver. Again, the process continues until every node gets the file.

Congestion and hardware limitation has been solved.

Note: The carrier of several networks may lie in the same collision band in practical implementation.

Result:
Coded this idea for ethernet. Checked in LAN system with star topology working fine with considerable speed up. Soon, I will update compared and accurate results.

Image representation:





Idea 2

Consider a classroom. The teacher teaches the subject and students listen to it. Once, the teacher finishes students ask for doubts. Many might have the same doubt. If, teacher clarifies that doubt it clarifies all the students who had that.

In the above, substitute teacher with the server, subject with file and students with receivers. We can use UDP multicast to send the file to all receivers at once. Once, the file broadcast is complete. Then receivers can ask for the resending of error and incomplete packets.

group-share's People

Contributors

bergstartup avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.