Modern streaming protocols sometimes go to absurd lengths to avoid too many hops so you get the data as soon as possible... torrent has so many jumps and negotiations to get to the actual file. It's good for decentralization but decentralization and efficiency go against each other.
Ask HN: Why is there no P2P streaming protocol like BitTorrent?
81–90 of 231 posts
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#82Part of the reason bit torrent works really well is that the file is downloaded in random order. It lets everyone cooperate, while still being robust to bad peers, bad network connections, churn etc. If you want live high quality streaming, a lot of reasons bit torrent works so well goes away. Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are do…
I am not convinced about the random order stuff. If most people will stream from the start then the start will be more seeded? So it's all good. And the order is requested by the client, and there are clients that go in the sequential order, like Deluge
And, sure, some BT clients can stream the data, but what the default is makes a huge difference.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#83There is peertube and webtorrent, but they does not seem to catch the mainstream users. In my opinion, NAT and the extensive tracking that has led users to distrust sharing their IP addresses are the reasons why it hasn't caught on. Imagine YouTube using P2P technology, it would save lot of money spent on caching servers.
Peertube and web torrent aren't doing live streams as far as i know, just stream of pre-recorded video, which is still a lot harder for p2p than random order download, but not in the same ballpark as a livestream. > Imagine YouTube using P2P technology, it would save lot of money spent on caching servers. I think its money well spent.
There is a lag between the source and the audience, maybe it's been improved in the last 4 years though, not sure.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#84People have tried to build BitTorrent clients to do this. As far as I know they never took off. The primary problem is you oftentimes don't get people who want to share back or who have firewalls or other connections that don't allow them to share back. So you end up with a few people who end up seeding everything out. The second problem is in order to watch a streaming protocol things need to arrive in order. It is…
Popcorn Time got taken down pretty hard because they became too popular too fast.
A commercial solution could have a seed server optimized for streaming the initial segments of video files to kickstart the stream, and let basic torrents deal with the rest of the stream.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#85Our library is general purpose and can be used whenever you need direct connections, but on top of Iroh we also provide iroh-blobs, which provides BLAKE3 verified streaming over our QUIC connections.
Blobs currently is a library that provides low level primitives and point to point streaming (see e.g. https://www.iroh.computer/sendme as an example/demo )
We are currently working on extending blobs to also allow easy concurrent downloading from multiple providers. We will also provide pluggable content discovery mechanisms as well as a lightweight content tracker implementation.
There is an experimental tracker here: https://github.com/n0-computer/iroh-experiments/tree/main/co...
Due to the properties of the BLAKE3 tree hash you can start sharing content even before you have completely downloaded it, so blobs is very well suited to the use case described above.
We already did a few explorations regarding media streaming over iroh connections, see for example https://www.youtube.com/watch?v=K3qqyu1mmGQ .
The big advantage of iroh over bittorrent is that content can be shared efficiently from even behind routers that don't allow manual or automatic port mapping, such as many carrier grade NAT setups.
Another advantage that BLAKE3 has over the bittorrent protocol is that content is verified incrementally. If somebody sends you wrong data you will notice after at most ~16 KiB. Bittorrent has something similar in the form of piece hashes, but those are more coarse grained. Also, BLAKE3 is extremely fast due to a very SIMD friendly design.
We are big fans of bittorrent and actually use parts of bittorrent, the mainline DHT, for our node discovery.
Here is a talk from last year explaining how iroh works in detail: https://www.youtube.com/watch?v=uj-7Y_7p4Dg , also briefly covering the blobs protocol.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#86Earlier quoted context omitted.
This is still just streaming a static file though. Adjusting which segment to get will work, buffering will work, and people don't mind their movie starting a few seconds after they press play. If I'm streaming live, I need the frame immediately, and it doesn't help much to get later frames after the frame I'm missing.
what if everyone agrees on a 10s delay?
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#87Part of the reason bit torrent works really well is that the file is downloaded in random order. It lets everyone cooperate, while still being robust to bad peers, bad network connections, churn etc. If you want live high quality streaming, a lot of reasons bit torrent works so well goes away. Latency matters. In bit torrent if the peer goes away, no big deal, just try again in 5 minutes with another peer, you are do…
I am not convinced about the random order stuff. If most people will stream from the start then the start will be more seeded? So it's all good. And the order is requested by the client, and there are clients that go in the sequential order, like Deluge
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#88Earlier quoted context omitted.
This is still just streaming a static file though. Adjusting which segment to get will work, buffering will work, and people don't mind their movie starting a few seconds after they press play. If I'm streaming live, I need the frame immediately, and it doesn't help much to get later frames after the frame I'm missing.
what if everyone agrees on a 10s delay?
But you can't live stream a conversation with someone if you have a 10s delay.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#89The only way this will be possible is if there is widespread adoption of an Internet overlay network similar to Tailscale in its design. Fortunately or unfortunately depending on how you look at it Tailscale is limited to Layer 3 so Multicast doesn't work (it depends on IGMP to function correctly).
Why Tailscale? Are you aware of IPv6?
Tailscale (or any other P2P overlay network) could solve this problem by re-enabling the multicast support that most ISPs block. It's not a terrible idea.
Edit: a comment elsewhere linked https://www.librecast.net/librecast.html which seems to be doing exactly this.
Re: Ask HN: Why is there no P2P streaming protocol like BitTorrent?
#90Earlier quoted context omitted.
Peertube and web torrent aren't doing live streams as far as i know, just stream of pre-recorded video, which is still a lot harder for p2p than random order download, but not in the same ballpark as a livestream. > Imagine YouTube using P2P technology, it would save lot of money spent on caching servers. I think its money well spent.
Peertube supports live streams https://framablog.org/2021/01/07/peertube-v3-its-a-live-a-li... There is a lag between the source and the audience, maybe it's been improved in the last 4 years though, not sure.
I couldn't find much docs on how it works, just https://docs.joinpeertube.org/contribute/architecture#live
Sounds like they break the stream into very small segments and publish each of those with bit torrent (?), they seem to claim about 30 second delay and scale in the hundreds but not thousands. Certainly impressive if true, i wouldnt of thought such an approach would scale so well. Of course its still a far cry from twitch, but nonetheless impressive.