OpenAI, LLMs, WebRTC, voice bots and Programmable Video
Learn about WebRTC LLM and its applications. Discover how this technology can improve real-time communication using conversational AI.
Read MoreBecause we can.
I think the people who defined WebRTC are historians or librarians. I say this all the time: WebRTC brings practically no new technology with it. It is a collection of existing standards, some brought from the dead, coupled together to create this thing called WebRTC. It is probably why many VoIP vendors fail to understand the disruption of it.
Trying to grok WebRTC? Here's a 3-part video lesson on WebRTC backend servers
Before I digress, let me get back on track here:
Data Channel is a part of WebRTC. It is a neglected part by most developers. It is awesome.
Oh. And it runs on top of this no name protocol called SCTP.
SCTP Stands for Stream Control Transport Protocol. It is an IETF standard (RFC 4960). And it is old. From 2000. That's when I had a full year of experience in VoIP. H.323 was the next big thing. SIP was mostly a dream. Chrome didn't exist. Firefox didn't exist either. We're talking great grandparents type old in technology years.
SCTP sits somewhere between TCP and UDP - it is a compromise of both, or rather an improvement on both. It also has a feature called multi-homing which isn't used in WebRTC (so I'll ignore it here).
I remember some time around 2005 or so, we decided at RADVISION to implement SCTP. I don't recall i this was for SIP or for Diameter. The problems started when we looked for an SCTP implementation. None really existed in the operating system. We ended up implementing it on our own, on top of raw sockets - not the best experience we had.
Fast forward to 2014. SCTP is nowhere to be found. Sure - some SIP Trunks have it. A Diameter implementation or two. But if you go look at Wikipedia for SCTP, this is what you get once you filter the list for relevant operating systems:
Abysmal for something you'd think should be an OS service.
Mobile? It is there on Android, but someone needs to turn the lights on when you compile Android and enable it. On iOS? Meh.
SCTP is never used. And when it does, it is by the VoIP community and for server-to-server communications. But now in WebRTC, it is used for peer-to-peer arbitrary data delivery across browsers.
Why on earth?
The answer lies in the word arbitrary. The data channel is there for use cases we have no clue about. Where we don't really know the types of requirements.
I'll try to explain it with the table below that I use in my training sessions:
For SCTP, reliability and delivery are configurable - I can decide if I want these characteristics or not. Why wouldn't I want them? Everything comes at a price. In this case latency, and assumptions made on my use case.
So there are times I'd like more control, which leans towards UDP. But I also want to make life for developers, so I'd rather hint to the protocol on my needs and let him handle it.
Similarly, here's a great post Justin Uberti linked to a few weeks back - it is on reasons some game developers place their signaling over UDP and not TCP. Read it to get some understanding on why SCTP makes sense for WebRTC.
The Data Channel is designed for innovation. And in this case, using an old and unused tool was the best approach.
Learn about WebRTC LLM and its applications. Discover how this technology can improve real-time communication using conversational AI.
Read MoreGet your copy of my ebook on the top 7 video quality metrics and KPIs in WebRTC (below).
Read More