Pushing the limits of JavaScript with P2P and streaming BitTorrent
summary
Shows a concrete system using nodejs + torrent-stream + WebTorrent and VLC to stream BitTorrent content on demand, with a concurrent piece fetching strategy (fetch critical pieces from multiple peers and drop slow ones — “house shopping”), uses DHT/magnet links for peer discovery (network ~10 million nodes), and implements pure-flix and peer-wiki (browse Wikipedia over torrents) plus a FUSE-backed torrent filesystem. Demonstrations work but are bleeding edge; claim is real-time P2P streaming is practical despite overhead and occasional instability.
AI-written summary · about
chapters (30)
- 0:00Intro
- 2:44javascript and bittorrent
- 3:25how does bittorrent work?
- 3:38when people think of bittorent they usually think
- 3:48PIRACY
- 4:04bittorent is way more than this
- 4:49nice and simple
- 6:05what if clients just share data between each other instead?
- 6:46THIS IS P2P
- 8:05split the file into pieces ~(512kb - 10mb) and hash each of them
- 9:20we could just store the list of hashes on a trusted server
- 10:08list of hashes (torrent file) can be large though...
- 10:54RECURSION TO THE RESCUE!
- 11:42use the info hash (magnet link) to verify the hashes
- 12:16this is basically how bittorrent downloads data
- 13:05DISTRUBED HASH TABLE
- 15:03PRETTY SIMPLE
- 15:47bittorrent can distribute A LOT of content
- 17:32high latency
- 18:01improvement: fetch important piece from many peers
- 20:05IMPLEMENTED THIS
- 20:21torrent stream is a node module that does this
- 21:19this is not a gimmick
- 22:00netflix uses ~1/3 of internet traffic during peak hours source
- 23:08Mathias, show demo of peerflix
- 27:47MAD SCIENCE
- 29:12all of wikipedia is
- 29:30peerwiki browses wikipedia using bittorrent
- 34:25FUSE + bittorrent streaming
- 36:40the P2P space in node is moving rapidly
related talks
22mJavascript... Torrents... and Mad Science!
33mBitTorrent Apps with JavaScript
34mWebRTC Mad Science
32mExploring the P2P world with WebRTC & JavaScript
49mWebTorrent
37mGet Rich Quick With P2P Crypto Currency
20mUsing WebTorrent trackers for purposes other than torrents
52mWebsockets and Torrents: A match made in PHP
