Making the (partial) Rust BitTorrent client more reasonable

Channel:
Subscribers:
97,800
Published on ● Video Link: https://www.youtube.com/watch?v=r0srf3kfZbs



Duration: 3:52:26
38,442 views
491


After doing the BitTorrent CodeCrafters challenge in #rustlang (https://youtu.be/jf_ddGnum_4), I had an urge to do some re-organization to better fit what a real implementation would look like when it has to handle files, multiple peers, multiple pieces, concurrency, etc. So, that's what we did!

If you want to give the whole challenge a try, please consider using my refrral link: https://app.codecrafters.io/join?via=jonhoo

0:00:00 Recap
0:11:18 Writing what we want to end up with
0:21:28 Writing the interface outside-in
0:36:56 Grabbing peer info
0:42:44 Interacting with a single peer
0:56:10 Decoding which pieces a peer has
1:34:11 Moment of hesitation
1:39:15 Ordering pieces
1:53:11 Connecting to a pool of peers
2:05:10 Grabbing pieces one by one
2:20:09 Cooperatively download all the blocks!
3:11:23 Handling choking
3:28:06 Putting together all the pieces
3:35:29 Fixing the one bug
3:45:23 The many things that remain

Stream diff: https://github.com/jonhoo/codecrafters-bittorrent-rust/compare/b7624aea62d47833c99af1555a8d44c7d9582c60...01dce6f489ecc7e5069960614d7b12ba66bdbec8

Live version with chat: https://youtube.com/live/8sEdv0G1VIE







Tags:
rust
live-coding
bittorrent
codecrafters