Comments (3)
Modification of active pieces & FileStore
I like the idea from a code perspective, but I'm still a bit unsure about the memory-use implications. Memory use would basically be unbounded (depending on how many open ActivePieces there are, and the size of the torrent's pieces). Although I guess if that were to become a problem, it could be mitigated through other means (off the top of my head, maybe choose at runtime if ActivePiece should use a []byte or file for storage), and we would still have the benefit of simpler code.
If the client is purely leeching, there is no need for a cache, even if the FileStore is remote
BitTorrent file distribution "works" because no client can/should be "purely leeching".
Otherwise, looks good to me.
from taipei-torrent.
100% agree, this proposal makes memory usage unbounded. Here's another proposal: keep an upper boundary of memory used for all ActivePieces, and in RequestBlock, prevent from creating a new ActivePiece if we have already reached the limit. Somewhere around here, check if the sum of active pieces' content + the potential new piece goes beyond the threshold; if true, don't request a new piece, just wait for the other ones to be retrieved, committed to disk and then discarded for memory to be available.
As you can guess, my goal is to avoid mixing parts as much as possible to keep everything simple (and, as you raised, under control).
BitTorrent file distribution "works" because no client can/should be "purely leeching".
If you're talking about "bittorrent the community", then I totally agree with you. However I'd like to see bittorrent used beyond the "community" use case, because the transport itself is extremely powerful; I'd like bittorrent to be the default transport protocol for distributing Wikipedia dumps, or Internet Archive items, or OSM tiles (or raw data), or my distribution packages. For those cases I expect users to be purely leeching content until completion, then leave the swarm (which would be kind of ok because there will always be an available seed, the upstream project). I'd expect them to be barely seeding content. Basically, I'd like bittorrent to be used when a client can reliably get the torrent (or even just the magnet) to retrieve data wherever it comes from, without having to seed just to improve its choking score.
Anyway, point taken, TT should remain "community" oriented in that it should not be directed towards pure leeching (that's a fair assumption).
from taipei-torrent.
Here's another proposal: keep an upper boundary of memory used for all ActivePieces, and in RequestBlock, prevent from creating a new ActivePiece if we have already reached the limit...
I like this, it seems like the most correct approach: "Don't []byte off more than we can chew" :-) .
from taipei-torrent.
Related Issues (20)
- How do I get list of peers for a given swarm? HOT 7
- Feature Request: Support WebTorrent HOT 1
- Leachers seem to prefer seeders, is that correct behavior? HOT 3
- "Rejecting peer because already have a peer with the same id" after node restart HOT 2
- Killed process can leave corrupted resume file.
- Torrent session not properly torn-down on loading error.
- This project does not implement "rarest first" algorithm
- Usually have "send a bad piece" error HOT 1
- have it implementation bep_0009? HOT 1
- sorry for a problem
- need help!!!
- add http stream Features pls
- Integration with blockchain (tendermint) HOT 1
- keepalived msg, empty msg, also read msg len: 1, why do this? HOT 6
- Request: Status update in-place
- Torrent file created from magnet link can't be loaded.
- Incorrect download size reported after client-side restart during the download process
- install error HOT 1
- Skip files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taipei-torrent.