by jedberg · 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)
I'm not saying there won't be problems. A major problem is the asymmetric nature of many consumer connections. Not only is the upload often a fraction of the download (that is the easy part), but the download speed can be greatly sacrificed if upload is utilized. Add to that issues that home users might want to use the connection for other stuff.
The nightmare and confusion surrounding "I can't game because someone is watching torrent-tube" will be real and add to that issues with ISPs that have a fixed quota or people on mobile (or tethering a mobile connection to laptop). Netflix et al would not like to deal with that kind of FUD spreading around.
And all this is before considering local ISP bottlenecks as it isn't what the network was designed for. A vastly superior option is to put a proxy on the ISP network itself (but yes, hard to do for small players).
Those alone are probably a magnitude worse than the technical issues you speak of. Even spotify got much flak for it, and no, I don't think anyone on earth think the bandwidth requirements of audio and HD video are similar.
Actually S3 can deliver blobs through bittorrent: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.ht...
> 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.
Put on your product hat: as Netflix, you want to control every aspect of the experience to ensure its absolutely seamless. When you outsource distribution to a huge set of third parties that becomes much harder to achieve.
It's entertaining to expand the idea beyond bandwidth...what about CPU/gpu time on my powerful consumer desktop sitting idle/off all day? Or storage space? The computer would need to be on to seed... Would people pay to also use the idle compute capacity?
Security is a problem, but it could be used to segment customers and providers. (Big corporations bidding for AWS capacity, tiny personal sites hosted on a CDN of cheap consumer hardware).
Tagline it "Uber for the cloud"!
not really, because have to pay for the electricity costs of leaving your computer on 24/7. assuming a modest 50W power consumption for a PC, that works out to 36KWh per month, or $3.6 at 10 cents /Kwh. That alone wipes away your $1/month you're saving. also, that's a third of the monthly plan cost, how much of a discount can netflix really offer here?
as for hard disk space, I'll grant it's "free" space (as in the consumer wasn't going to use it anyways), but running consumer drives 24/7 with frequent seeks can't be good for them.
Yes, it depends on country. But I also suspect the total upload bandwidth for typical users in typical locations simply isn't there to make the idea work at scale.
(all numbers are hypothetical)
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).
Also, have a large and single-purpose Tor deployment controlled by a single provider would mean there would be no privacy from that provider and anyone able to send them subpoenas. I think that this weakens the privacy provided to the point where the decision to use Tor at all becomes questionable.
It was removed in 2014 in favor of central distribution.