by ryukafalz · 8y ago · 0 comments
The problem with P2P is that you have to make what you have public. That’s fine for a game update where it’s all the same, but for movies there are huge privacy implications.
* It's slower to deliver video since you're reliant on upload connections of end users
* It's less reliable (same reason as above)
* You have no guarantee that chunks will arrive in the right order to actually stream data (ie the end of the file might download first)
* You cannot send multiple different video qualities in the same stream and have the client dynamically pick the right bitrate for their connection (this is what current streaming services do and why you often see Netflix / Prime video / etc switch between quality mid-stream without having to restart that stream. I can write more in this if people are interested)
* It's harder to debug network problems if you are experiencing issues with video quality (been in enough stressful emergency meetings with network guys over the years - I can't imagine how much worse it might have been if we couldn't do a full end to end trace of the delivery)
* Time to start playing a new stream is longer (which end users might care about)
* It couldn't support live services where the video data is being generated near real time
The current methods for video delivery are actually really good, bittorrent would be a major step backwards. However for delivering other kinds of assets - such as patches to computer games - protocols conceptually similar to bittorrent are used.
Doesn't really matter, it is fast enough. If it isn't you back it up from a datacenter.
> It's less reliable (same reason as above)
Shouldn't be any real difference in reliability.
> You cannot send multiple different video qualities in the same stream and have the client dynamically pick the right bitrate for their connection (this is what current streaming services do and why you often see Netflix / Prime video / etc switch between quality mid-stream without having to restart that stream. I can write more in this if people are interested)
Sure you can. You only have to have a small map between play time and file offset for the different streams, the client will then pick whatever it wants.
> You have no guarantee that chunks will arrive in the right order to actually stream data (ie the end of the file might download first)
The client can decide this. There are torrent clients that do this already. Buffer 2 minutes, if some chunk is missing when 20 seconds remains pull it from a datacenter instead.
> Time to start playing a new stream is longer (which end users might care about)
No, you start streaming from the datacenter.
> It couldn't support live services where the video data is being generated near real time
Not sure, but if a minute is acceptable delay (depends on what is being broadcasted) it should be feasible. A live webcam for a tourist resort should be fine, a sports event, maybe not.
Spotify even used to work this way. When a user clicked play (or seeked to a different part of the song) the first (if I remember correctly) 15 seconds was fetched from their CDN. After that it used its own torrent-like system to continue and pre-fetch the next song.
Sorry but no it really isn't. You'd have to rely so much in your own data centre that you'd loose the benefit of bittorrent. Plus many services will use a commercial CDN, none of which current support bittorrent. So you'd end up having to build your own infrastructure there, which would be a great deal more expensive.
> Shouldn't be any real difference in reliability.
Home connections might drop off due to power cuts, router failure or any of the other numerous conditions that datacenters battle against. Home connections might get throttled by ISPs.
Where I work we offer 5 "9s" of reliability on some services, good luck asking consumer broadband to offer the same ;)
> The client can decide this. There are torrent clients that do this already. Buffer 2 minutes, if some chunk is missing when 20 seconds remains pull it from a datacenter instead.
2 minutes is an excessively long buffer compared to.how long most RMTP segments are (often 15 seconds or below).
> No, you start streaming from the datacenter.
So then why bother with bittorrent at all?
> Not sure, but if a minute is acceptable delay (depends on what is being broadcasted) it should be feasible. A live webcam for a tourist resort should be fine, a sports event, maybe not.
A minute isn't even close to acceptable delay. Imagine if you're watching a sports match and Twitter is ahead of your video fees, you wouldn't be grateful for the spoilers. This is a real world problem with video streaming and why they talk about getting the latency down to 5 seconds or less.
> Spotify even used to work this way. When a user clicked play (or seeked to a different part of the song) the first (if I remember correctly) 15 seconds was fetched from their CDN. After that it used its own torrent-like system to continue and pre-fetch the next song.
Spotify is audio only. People love to compare video streaming to audio streaming but they don't realise that HD video is an order of magnitude more complex to stream - in terms of bandwidth, syncing, dropped frames, etc.
It's one of those problems that seems easy to solve from a superficial level but when you start getting to the broadcaster level it's actually a great deal more complex than even Plex and other self-hosted streaming services would lead you to believe. (Disclaimer, I've worked at the broadcaster level)
> It's slower to deliver video since you're reliant on upload connections of end users.
This has been scaling really well for small unfunded projects that need to deliver big binaries, such as open source distributions.
> It's less reliable (same reason as above)
If you have large corporate or state level actors trying to censor the content, then this becomes the more reliable method.
> You have no guarantee that chunks will arrive in the right order to actually stream data (ie the end of the file might download first).
This is not fixed by the protocol, but by clients optimizing for total download speed. I think some clients allow you to download more sequentially.
> You cannot send multiple different video qualities...
Video torrents often come in 720p, 1K and sometimes even 4K versions. So you could pick in advance. But that's not dynamic mid-stream like you mention.
Since you offered to write more: Is there such a thing as a progressive codec for audio/video? I vaguely remember video chat codecs doing something like this, where you get progressive degradation if you loose packets.
> It's harder to debug network problems...
oh yes...
I think this is the main reason Skype and Spotify moved away from the P2P tech that they used initially. I hope this becomes less of an issue when projects like LibP2P and IPFS mature and become as reliable and common as TCP/IP and TLS.
> Time to start playing a new stream is longer...
You can solve many of the issues mentioned above by having high quality sponsored seed servers. This is basically a hybrid approach. The seeds would guarantee good services and the P2P part would reduce load on the seed servers where possible.
> It couldn't support live services where the video data is being generated near real time
Not Torrent, but there's community of P2P television streams, quite popular for big sports matches. And from what I hear great quality. This is a completely different P2P model, more like a multicast stream. Can not do the sort of on-demand streaming that Netflix would require.
I just can't ever see it being practical for video deployment. At least not in its current guise (thus whatever P2P model might succeed in the future wouldn't be authentically bittorrent).
If anything, with AWS and other "clouds" offering services for video delivery (Media Live, CloudFront supporting RMTP etc), I can see bittorrent becoming ever more irrelevant for video distribution. At least thats the trend Ive been observing recently. But tech can move in unpredictable directions so never say never.
Yes, torrents have some downsides - forever they can be worked through at some cost of quality. I might see some delays occasionally for example while I wait for an it is sequence chunk to arrive.
However for some content/use cases, perhaps that will be acceptable.
Right now the economics favor a dedicated and reliable changes from the source - e.g Netflix.
Perhaps one day another use case will appear where the massive cost benefits of piggybacking off other people's resources comes into its own.
But I guess "never say never?"
There is a simple way to fix that. You wouldn't want to force everyone to upload anyway (some are on metered connections etc.), so what you would do is offer a nominal discount for uploading, but if you choose it then you don't just host what you watch, you host whatever needs more hosting capacity. Then random third parties can't tell what you watch because what you host is random.
This reduces the efficiency somewhat, but it's easy to minimize that: Don't give someone a hundred movies to host, give them one movie and have them host it a hundred times (over the course of a year).
You're also not considering the power law distribution. If nineteen customers have 1Mbps uploads and one has symmetric gigabit, the average is >50Mbps. And the discount could be per-byte -- set it at half whatever the cost of central servers would be.
I'm actually slightly surprised that nobody at Netflix has already done that. Netflix Steambox would be a thing people would pay money for, and then you don't have Google/Apple/Amazon/Comcast/etc. diverting your customers to their video services because your customers are using their devices.
Also notice that you don't need 100% of users to upload. Having 10% of users with a 5:1 ratio still cuts your bandwidth costs in half.
World would be a lot better place if we starts becoming comfortable with sharing our real thoughts/preferences openly, and it would simplify transition to truly public-sprited internet platforms based on etherium, etc.
I can understand the hesitation. It's warranted, but there is progress such as this very threads response.
>> According to an interview in 2012 with Chuck Rossi, a build engineer at Facebook, Facebook compiles into a 1.5 GB binary blob which is then distributed to the servers using a custom BitTorrent-based release system.
Above part is taken directly from Wikipedia article on Facebook - "Technical Aspects" section.
https://blog.twitter.com/engineering/en_us/a/2010/murder-fas...
But you're probably right in that this is a relevant problem, as IP addresses are considered PII (in Europe at least), so leaking them could be problematic. That said, as Netflix already has a contract with each of its subscribers it shouldn't be too difficult to modify it to accommodate that kind of data sharing.
I imagine the real problem is ensuring streaming quality in such an infrastructure, as it's very hard to predict when a node will go down (e.g. user turns off laptop) or massively degrade in bandwidth (e.g. user starts downloading other content), and there's not much that customers hate more than interruptions when streaming movies (as you can probably attest firsthand). So given all these constraints it might be cheaper just using a CDN. Also, the bandwidth costs per customer probably make up a negligible share of overall costs (licensing is probably the biggest part) so it might not be worth optimizing this at all. I'd estimate that when I used Netflix I streamed maybe 20-30 movies / episodes per month (sometimes more), which would total at about 50-100 GB max (?) given the right encoding. For a company like Netflix that distributes probably petabytes of data a single GB should cost significantly less than 1 cent, so my bandwidth cost to Netflix would be between 0.5-1 $ per month (I even think it's much less probably).
It was removed in 2014 in favor of central distribution.
People were very upset about use of bandwidth. This would have been around 2007 when most Internet accounts in the UK had download limits.
https://en.wikipedia.org/wiki/BBC_iPlayer#Computer_platforms
P2P is an interesting approach to large scale media distribution, but aside from the bandwidth issues, I imagine they were under immense pressure from copyright holders to steer clear of it.
BitTorrent is abysmal for me. It quickly saturates my uplink bandwidth, destroying downlink performance. Or I cap it, or it discovers a cap, and my upload rate is slow enough that I'm labelled a leech in the BitTorrent network and get a slow download rate.
World of Warcraft's updater was absolute trash for me. I always got far better transfer rates turning off P2P and sucking up the congestion on the direct download option.
BitTorrent simply doesn't work for most of the world's commercially available home links.
If there was some kind of micropayments infrastructure for seeders/leechers/content owners, I would happily seed arbitrary-but-legal torrents with my 1000/1000mbps connections in exchange for credits towards media or cash to cover the connection ... While I imagine you'd pay to download using BitTorrent, with some tiny fraction going to me (proportional to resource consumption) but never seeding to others.
[0]: http://joystream.co
Many companies back then tried to startup based on business model of doing this via end users as you suggest. It was mostly sunk by users’ pretty reasonable opinion they didn’t want to donate their upload bandwidth on their metered plan.
Was actually a torrent.
Wouldn’t that be amusing. How would we know any difference?
A perfect use for it would be to distribute VNR’s (Video News Releases) and other audio and video from public relations firms and large companies.
The big obstacle is introducing any new protocol into a large bureaucracy.
It took a company I work with eight weeks to get their artist an SFTP program for his computer so he could send material to the printing companies; and another month to convince IT to open the ports in the local network.
By then he’d just sent a bunch of DVD’s by messenger.
Can you please elaborate a little bit? My business understanding of VNRs is that they are not in demand per se, and are pushed/pitched out-of-band to (hopefully) receptive editors and news directors. Is this true and what does P2P add to this?
For example, if you're a consumer products magazine, you will probably want whatever VNR Procter & Gamble has for its latest dessert topping/floor wax. It would be massively simpler for P&G to provide a torrent link on its website that interested publications could just click.
Or, let's say you're a construction company that just built an awesome new bridge. A VNR with drone footage of the construction process on your website that could be downloaded via torrent with a click would be helpful for the TV stations in your market.
I sometimes work with real estate developers. At this time, they're all sending video, huge photos, and massive PDF books to print, TV, and web publishers via Dropbox. Some even use Flickr for press photos. Torrenting those would seem to be a better method.
Further question: I too work with real estate developers. You're suggesting they publish a link to assets where the browser depends upon a torrent application to complete download, no? Or, alternatively, did things progress while I wasn't looking and now torrents can be completed in-browser?
I think the larger picture here, is if your Netflix, you're happy to centralize, put distro points of ISP networks, etc. to provide a great user experience. How many people would be annoyed about Netflix dragging down their internet connection to make the service a couple of bucks cheaper?
In the US I presume, where ISPs are monopolies and probably had to be in on this to make it work.
> How many people would be annoyed about Netflix dragging down their internet connection
Why would it drag down anyone's internet connection? It's not hard to make it behave well and self-throttle, when internet connection is used for something else.
Works today in Chrome, Firefox, edge, etc.
In Brave--Brendan Eich's new browser--you can even drop a magnet link directly into the URL bar! Uses WebTorrent under the hood.
If there was a financial incentive every browser would have been capable of downloading files off BT as seamlessly as off HTTP.
i don't even care whether the video starts immediately. im perfectly happy to wait ~10mins to get a decent buffer of chunks at the beginning of the file.
Encrypted or not, BitTorrent traffic still looks like BitTorrent traffic.
The BitTorrent protocol has a peculiar connection pattern.
Or from a webrtc video call / ring [0] call.
Or a person downloading a few files from 10 to 20 different websites.
I don't see how my computer connecting to 10 ips is characteristic of bit-torrent and not of performing encrypted communication of another type with said ips.
[0]: https://ring.cx/
On the reliability side, you can easily include an HTTP web seed, though as long as the company offers the torrent on their fileserver, there isn't much benefit for doing that.
Windows 10 P2P Distribution for Updates: https://lifehacker.com/windows-10-uses-your-bandwidth-to-dis...
Blizzard/HTTP Web Seed: https://en.wikipedia.org/wiki/BitTorrent