Jerod assembles a team of WebRTC experts (Suz, Feross, Mikeal) for a deep, deep dive on this practically-ubiquitous yet still-complicated web API.
We review its history, share really cool applications using the tech, provide an excellent primer on what you need to know about it, and details some production gotchas. ALSO we celebrate how Feross single-handedly “upgraded the internet”! 🙌
Matched from the episode's transcript 👇
Mikeal Rogers: [19:50] One thing that you figure out really quickly is that if you’re taking in all of these high-quality audio channels, and you’re taking them into one of the peers who is the host of the call, while the call is going on, then there’s not enough bandwidth for the actual audio quality to be good… So you can really saturate your connection really quickly. So what you actually wanna do is just buffer that kind of locally, and then send it at the end of the call. But then if somebody closes the browser, then you don’t have the audio… [laughs]
So actually, what it turns out that you wanna do is send this to a server. This is actually a place where a central server would be quite nice… And there are some products now that do this really well, where it’s using a real-time audio channel, but then sending all of the background channel to a server… And then at the end you’ll see that it’s like “No, no, no. Don’t stop yet. We’re still uploading.” So there’s some UI around that that’s really nice. I never really got to that part of it… And I looked into solving some of those issues with some other technologies. I looked at potentially using WebTorrent to do the file portion of it, and that didn’t quite work, so I started looking at IPFS, and at that time - this was three years ago - IPFS wasn’t quite ready.
The next bucket of projects, the peer-to-peer projects that use this because it’s the only thing to use - there’s a lot of cool stuff in that category. Feross was talking about WebTorrent, and WebTorrent is amazing… IPFS is something that I work on a little bit - it’s really nice now; it uses that channel as well. And then IPFS is really built on some primitives that also take advantage of this. I work on IPLD, which is like the data structures… And we don’t do anything specific with WebRTC, but if you wanna take our data structures and decentralize them, you would have to use WebRTC in the browser.
The whole networking layer behind IPFS is a project called libp2p, and this is really like a peer-to-peer networking stack. If what you’re looking at is the whole problem of peer-to-peer networking, and content discovery on a peer-to-peer network, and if you wanna run this in the browser, in Linux, everywhere, and every kind of environment, you’re gonna need all these kinds of fallback logic, and all these different protocols on different devices, and you’re gonna have to think about this in a much bigger way than you would if you were just targeting one system. That’s what libp2p kind of does.
So yeah, if you have that whole problem, it’s a really good project. I think that if you wanna hack together a cool little web project, it’s a little bit heavy for that one thing. Ethereum 2 is gonna be built on top of libp2p, because they have this whole problem…