dat-node
dat-node copied to clipboard
"ratio limit" for users with restricted upload bandwidth
I am reporting:
- [ ] a bug or unexpected behavior
- [ ] general feedback
- [x] feature request
- [ ] security issue
For a user with high upload bandwidth costs, if they are creating a large file (for example, an hour long piece of audio) it would be nice if it was possible to set a ratio limit, kind of like in a bittorrent client. I see here (https://github.com/datproject/dat-node#network-options) that you can set upload to true
or false
, but maybe it makes sense if the library could accept another option ratio-limit
that stops uploading once the data uploaded becomes 100%
(or whatever the value is). This way, the user doesn't incur upload bandwidth costs and other peers take over the burden of serving the file once the entirety is available in the swarm.
Good idea. I think we'll need to implement a nicer API for detecting progress first.
I think this will be complicated by the "latest" flag being set where we'd need to figure out which chunks of the latest files are uploaded where.
Do you think you'd be interested in devoting some time to figuring this out?
Hey @RangerMauve , I could potentially dip my toe in to start with, but i'd need more back and forth to get enough direction in order to make real progress. I've proposed dat architecure for a possible community radio project. If we decide to go the P2P route there would be more drive to have this feature working.
I'd be more than happy to work through it with you. 💜😁
A good starting point would be to read up on how dat works to get a feel for the low level parts and the filesystem.
From there, it'd be good to read up on the replication logic to see how we interact with peers.
From there we'll need to look into how we can use the data we get from peers to relate to upload ratio.