Why was SCTP selected for WebRTC’s data channel? (2014)
bloggeek.me
bloggeek.me
Writing a SCTP implementation for Pion WebRTC[0] was really enjoyable. The SCTP RFC is well written and easily available [1]. Once you learn all the chunk types things start to fall into place. SCTP is also battle tested and we know what flaws it has.
I am pessimistic about alternatives
* New protocols/changes are spread across multiple drafts, and they are abandoned once they land in browsers. Most of the time these changes are already going to happen and these drafts are just a way to notify the general public it is happening. So it ends up being 'the implementation is the spec', and things are brittle. SCTP doesn't break like that.
* WebRTC is still very difficult to use. For large dev teams/corporations it is a solved problem, but I really wish there was more excitement/emphasis around lowering the barrier to entry. It is a really powerful technology, but it seems like we just keep getting half-baked things out the door and then moving on.
Are you referring to the barrier to use WebRTC or the barrier to make your own implementation?
I read some article about SCTP but I still keep wondering what the best usecase for SCTP is. Can you give some examples?
The kernel implementation in Linux is stable and has been for many versions.
There are gotchas: - Cloud support for SCTP is poor. Azure has no support for SCTP on its load balancers. - Kubernetes support is similarly poor - SCTP support is beta and behind a feature gate.
I haven't tried it myself, but always heard the only way to make it work was encapsulated in UDP.
Routing SCTP over IPv6 should be easier.
I want to eventually explore building a very minimal SCTP implementation and maybe get the binary size sub 400Kb. IoT/Embedded is just getting warmed up to WebRTC, I am really excited to see what happens next.
[0] https://github.com/awslabs/amazon-kinesis-video-streams-webr...