Giter Site home page Giter Site logo

swarmtorrent's Introduction

SwarmTorrent

A UNIX system to launch torrent systems.

This system consists of a peer and a tracker, which have their own tasks. In the sections below, we will describe them in detail. Additionally, we provide some information on the protocols used. For a list of both functional and non-functional requirements, see requirements.md

TODOList

A list of things we still have to do in order to advance the project.

Connections:

  1. Make basic TCP connection in /src/shared code.
  2. Make connection factory type to allow us to use generic connection objects, while the driver code below handles TCP/UDP/INET type connections

Files:

  1. Implement the SwarmTorrent file structures (IMPLEMENTED) (NOT TESTED)
  2. Implement FileInfo structures to split a file into Fragments and to keep track of the received fragments (IMPLEMENTED) (NOT TESTED)
  3. Implement FragmentHandler to handle the sending and receiving of fragments, and reading/ writing them from the right file. (IMPLEMENTED) (NOT TESTED)
  4. (Bonus) Make basic filestructure description, so we can send a directory instead of just 1 file. (NOT STARTED)

Trackers:

  1. Trackers should contain a PeerTable (IMPLEMENTED) (NOT TESTED)
  2. Peers should be able to subscribe/ unsubscribe
  3. Peers should be able to retrieve and update PeerTable
  4. Tracker should shut down at some point ('full Seeder' system?)

Peers:

  1. Setup Torrentfile (IMPLEMENTED) (NOT TESTED)

Peers

Peers form the largest part of torrent networks. Their goal is to send data to users requesting it (seed), and receive data from users requesting it (leech). The data to be seeded/leeched is encoded in a .st (SwarmTorrent) file.

Peers are able to simultaneously seed and leech on a .st file: A peer seeds any received file fragments to other peers in the network which are requesting it.

Trackers

A tracker server is in charge of providing information to the swarm. When a peer reads a .st file, it contains a table of tracker servers. When peers connect to a tracker, the tracker is responsible for providing the tracker with a list of peers that are in possesion of some parts of the file

SwarmTorrent file

The SwarmTorrent (.st) file contains information on the file to be seeded/ leeched and the tracker servers. This fileformat is based on the BitTorrent protocol from: https://www.bittorrent.org/beps/bep_0003.html. SwarmTorrent has the following content:

  1. Tracker Table: contains information required to set up a socket with the trackers
  2. Name: suggested name to save the file (advisory)
  3. Length: the total size of the file in bytes
  4. Fragment Length: the size in bytes of one fragment
  5. Seed Threshold: the number of fragments required to start seeding
  6. Fragments: the SHA2's for every fragment

Considerations

  1. Distributed Hash Tables (DHT) a system which removes the swarms dependance on the tracker server. "Responsibility for maintaining the mapping from keys to values is distributed among the nodes, in such a way that a change in the set of participants causes a minimal amount of disruption."
  2. Peer EXchange (PEX), so a peer in a swarm can tell others that a new peer has joined/one has left

swarmtorrent's People

Contributors

rissie1997 avatar sebastiaan-alvarez-rodriguez avatar mariskaijpelaar 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.