<story><title>Instant.io – Streaming file transfer over WebTorrent</title><url>https://instant.io/</url></story><parent_chain><item><author>jzelinskie</author><text>I work on some BitTorrent software and while it&amp;#x27;s a really cool protocol, it isn&amp;#x27;t designed to sequentially stream data. Some clients support streaming, but the act of prioritizing sequential chunks of data rather than chunks that are most likely to be unavailable in the future is bad behavior for the collective group of peers.&lt;p&gt;I haven&amp;#x27;t personally given much thought to solving the problem of streaming, but I am surprised that the WebTorrent FAQ doesn&amp;#x27;t mention why they didn&amp;#x27;t take this opportunity to design a protocol that has more suitable trade-offs than BitTorrent. I&amp;#x27;m getting mixed messaging; is their goal to connect the BitTorrent network with WebRTC or enable high quality P2P streaming via WebRTC?</text></item></parent_chain><comment><author>feross</author><text>Hi, creator of WebTorrent here.&lt;p&gt;&amp;gt; [BitTorrent] isn&amp;#x27;t designed to sequentially stream data&lt;p&gt;We’re working on improving the algorithm to switch back to a rarest-first strategy when there is not a high-priority need for specific pieces. In other words, when sufficient video is buffered, there’s no need to deviate from the normal piece selection algorithm.&lt;p&gt;But the fact is that with the speed of today’s internet connections, the user is going to finish fully downloading the torrent in a fraction of the time it takes to view it, so they will still spend more time seeding than downloading.&lt;p&gt;In practice, the only time that the rarest-first algorithm is important is on poorly-seeded torrents, or in the first few hours of a torrent being published when the ratio of seeders to leechers is really bad. I plan to keep improving the piece selection algorithm so that WebTorrent can be a good citizen.&lt;p&gt;Also: you should note that not all WebTorrent users stream sequentially. That&amp;#x27;s just one option for downloading the data.&lt;p&gt;Also: It&amp;#x27;s noteworthy that BitTorrent Inc.&amp;#x27;s official torrent client (as well as the largest player by marketshare), uTorrent, offers sequential downloading, as well as selective file downloading. And the BitTorrent network remains very healthy.&lt;p&gt;&amp;gt; why they didn&amp;#x27;t take this opportunity to design a protocol that has more suitable trade-offs than BitTorrent&lt;p&gt;BitTorrent is the most successful, most widely-deployed P2P protocol in existence. It works &lt;i&gt;really&lt;/i&gt; well. My goal with WebTorrent was to bring BitTorrent to the web in a way that interoperates with the existing torrent network.&lt;p&gt;Re-inventing the protocol would have made WebTorrent fundamentally incompatible with existing clients and prevented adoption. The way we&amp;#x27;ve done it is better. The wire protocol is exactly the same, but there&amp;#x27;s now a new way to connect to peers: WebRTC, in addition to the existing TCP and uTP.&lt;p&gt;Also, re-inventing the protocol is a huge rabbit hole. There was already a lot of risk when I started the project -- will WebRTC get adopted by all the browser vendors? Will data channel stabilize and be performant? Is JavaScript fast enough to re-package MP4 videos on-the-fly for streaming playback with the MediaSource API? My thinking was: Why add inventing a new wire protocol and several algorithms to the table?&lt;p&gt;Thanks for your thoughtful comment. Hope you&amp;#x27;ll give WebTorrent and our new desktop app, WebTorrent Desktop a try!</text></comment>
<story><title>Instant.io – Streaming file transfer over WebTorrent</title><url>https://instant.io/</url></story><parent_chain><item><author>jzelinskie</author><text>I work on some BitTorrent software and while it&amp;#x27;s a really cool protocol, it isn&amp;#x27;t designed to sequentially stream data. Some clients support streaming, but the act of prioritizing sequential chunks of data rather than chunks that are most likely to be unavailable in the future is bad behavior for the collective group of peers.&lt;p&gt;I haven&amp;#x27;t personally given much thought to solving the problem of streaming, but I am surprised that the WebTorrent FAQ doesn&amp;#x27;t mention why they didn&amp;#x27;t take this opportunity to design a protocol that has more suitable trade-offs than BitTorrent. I&amp;#x27;m getting mixed messaging; is their goal to connect the BitTorrent network with WebRTC or enable high quality P2P streaming via WebRTC?</text></item></parent_chain><comment><author>alecco</author><text>Weird, a friend of mine used to stream with utorrent years ago without problems. Maybe one pause of a few seconds for a whole TV episode.&lt;p&gt;The problem is not the protocol but the lack of features like subtitles. And torrent contents not being standard. All this can be easily scripted to cover most cases.</text></comment>