mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 227 forks source link

More modularization! #26

Open mafintosh opened 10 years ago

mafintosh commented 10 years ago

As illustrated by #25 it would probably be a good idea to futher modulalize index.js into smaller pieces (in seperate npm modules if possible)

transitive-bullshit commented 10 years ago

I think the main change needed is to breakout the Client from Torrent classes. The other main area I could see deserving its own class (and/or module) would be isolating the complicated piece selection logic. This will only get more complicated as time goes on, but we really should be able to encapsulate it as a black box swapping out different piece selection strategies under the hood.