4 ms·
Can someone explain why we need a Twilio backend to do WebRTC? I've never done it so I don't know, but I thought the whole point was that it's peer-to-peer. I
by nwsm 7y ago
Can someone explain why we need a Twilio backend to do WebRTC?
I've never done it so I don't know, but I thought the whole point was that it's peer-to-peer. I know there is some kind of "discovery" layer required, but this doesn't seem complex enough to warrant a SaaS.
- fersho311 7y agoLet me try to take a stab at this: If you have video chat with 10 people, then you have peer connections with 10 people. Each person will have connections with 10 other people, resulting in 10x10=100 connections. With a streaming server, you would just need 1 connection to a server that would give you 10 media streams. With a streaming server, you can also do recording and stuff.
- nwsm 7y agoI see. I didn't realize the Twilio backend did more than a simple p2p webrtc system.
- lioeters 7y agoFrom what I learned, for production use of WebRTC, a specialized signalling server (STUN/TURN) is needed to reliably coordinate communication among peers - in particular, to deal with network address translators (NATs) and firewalls. Most open-source WebRTC implementations I've seen use a list of semi-public STUN/TURN servers, notably including Google's, which I believe are explicitly for dev/testing purposes. In addition to this "discovery layer" - and possibly handling reconnections - I imagine it's non-trivial to provide video/audio transport, compression, etc. I'd love it if it were simpler to use WebRTC, truly peer-to-peer, in the vein of how early Skype used to work. Unfortunately, from what I've learned so far, there are still technical hurdles to self-host such a service. https://en.wikipedia.org/wiki/STUN https://en.wikipedia.org/wiki/STUN https://en.wikipedia.org/wiki/Traversal_Using_Relays_around_NAT https://en.wikipedia.org/wiki/Traversal_Using_Relays_around_... https://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment https://en.wikipedia.org/wiki/Interactive_Connectivity_Estab...