-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Related to the file sharing requirement is the need to do decentralized peer discovery using e.g. a distributed hash table. The existing file sharing requirements focus on throughput and backpressure, but the other ingredient missing for p2p file sharing is a low latency, highly parallel (low overhead) socket.
Motivation
Making a WebRTC connection now is very slow compared to say UDP hole punching w/ BitTorrent, with a ~5RTT handshake and ICE/STUN negotiation. However, [email protected] was apparently working on a version of DataChannels powered by QUIC protocol which boasts 0RTT handshakes in the best case. https://www.youtube.com/watch?v=mIvyOFu1c1Q
In order to implement a fast DHT lookup for example you need low latency, low overhead connections, so you can do wide fanout style network searches with high concurrency. BitTorrent for example contacts hundreds of peers in Kademlia in the first few hundred milliseconds of opening a torrent.
I don't imagine we will ever get raw UDP or TCP sockets added to JS in the future because of the lack of encryption, but QUIC has a great story for stateless mode performance as well as built in TLS-like encryption. It would allow the number of concurrent WebSocket and WebRTC connections on a page to go up from the current limits (~10 data channels per page or so?) to many more (depending on how it's implemented, but in general the amount of state per connection should be much lower).
Ian Swett has stated that google wants to do more standards work with it, but in more recent posts like this https://cloudplatform.googleblog.com/2018/06/Introducing-QUIC-support-for-HTTPS-load-balancing.html they no longer mention Data Channels, and I can't really find much info about if that's still a planned feature.