Giter Site home page Giter Site logo

Comments (2)

erindru avatar erindru commented on May 30, 2024

You've stumbled on something that I never actually managed to complete. Currently a "Plan" is tied to a specific backend, and a user is tied to a plan. So you can have multiple users each with their own backend. This was "good enough" in my flatting situation where I could just tell my flatmates to pay for their own VPS and I could set it up so any torrents they downloaded went to their own VPS instead of mine.

But you're right, a proper torrent scheduling algorithm would be ideal. I could never decide on what i should look like - if you scheduled based on available space, you need to know the total torrent size up front (impossible with magnet links). You also run the risk of one node serving hundreds of small torrents, and another node serving a few large torrents.

If you schedule based on "number of torrents", you run the risk of running one of your nodes out of space because one node could have 3 small torrents on it and the other could have 3 large torrents.

I came to the conclusion that I needed a combination of both, but I needed to know the total size of the torrent up front before making a scheduling decision. This meant I had to either drop support for magnet links, or create a "magnet to torrent" converter.

I have tried several times to make a "magnet to torrent" converter but I never seem to finish the project or get it into a working state.

from openseedbox.

dausruddin avatar dausruddin commented on May 30, 2024

Instead checking torrent size, maybe you can check actual size of the disk? You can use percentage to balance then.

DiskA = used/total_100 //used space in percent
DiskB = used/total_100 //used space in percent

if DiskA>DiskB then
put.torrent.in = diskB

This is just a concept. I don't know about language you used so I don't know the real environment about it.

This will balance the space used.

from openseedbox.

Related Issues (20)

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.