| > There is a lot more to security than transport-layer encryption and authentication. You are welcome to PR. > Connection based This could be explored: starting from simple handshake, all the way to fully connection based protocol. Open for discussion based on developer needs. > The already-stated "requirements" are asking for something more complex than WebRTC. You are welcome to highlight specifics that makes you think that way. > Wait, are you thinking about using UDP to transport HTTP?! Do you even know what your MTU is? UDP is not streamed but message based protocol. As WebSockets implement their transport layer over pure TCP, WebUDP could implement it's own layer over pure UDP for various reasons. > > WebRTC suffers from complexity > That complexity exists for reason. For P2P type communications, this complexity is perhaps reasonable. For Server-Client type communications not at all. > Nowhere in this document is a discussion of the potential problems of using UDP or the ways tthe new service might be exploited by malicious actors. This document is initial effort to bring public discussion to form a reasonable shape of what WebUDP could look like. You are welcome to participate. |
I'm very[1] familiar with the IP family of protocols.
> Open for discussion
If you don't know what your requirements are, you shouldn't be choosing a transport technology. It sounds like you want an library that wraps WebSockets or WebRTC and handles most of the complexity.
> WebUDP could implement it's own [transport] layer over pure UDP
Then you want TCP. The only reason to use UDP is to avoid the complexities of a transport layer. Transport reliability is very hard; this isn't something that is easy to re-implement by yourself in UDP.
More importantly, I take it you don't know what your MTU is? The Maximum Transmission Unit[2] the maximum packet size. On ethernet-based networks, it's probably ~0-100 octets less than ethernet's 1500 octet MTU. You need to keep UDP packets under this limit, or they will fragment. Fragmented IP packets may not arrive at all and even when they do, the OS will wait until all fragments arrive before passing the data up to the app. If you're insane and send HTTP headers in each packet, you've wasted most of your data space. Each packet? Shouldn't we send headers in the first packet only? Except that every packet IS the "first packet" in stateless protocol like UDP. It's the transport features of TCP that create ordered-data semantics.
[1] I used to write firmware for embedded systems. That included writing - from scratch, in Z80 asm - the entire network layer: ethernet (RealTek), ARP, IP, UDP, TCP, SNMP, HTTP, etc.
[2] https://en.wikipedia.org/wiki/Maximum_transmission_unit