5 ms·
So UDP is great. I love the simplicity of it, and the fact that it adds very little overhead while being sufficiently low level means you can do all the fun net
by IgorPartola 12y ago
So UDP is great. I love the simplicity of it, and the fact that it adds very little overhead while being sufficiently low level means you can do all the fun networking things yourself.
What would be great is a "third half" of this equation: a popular protocol a la SCTP. Imagine not having to re-invent message size headers for every damn protocol: the size of your packet is embedded in the datagram just like UDP, but the transmission is reliable just like TCP. HTTP would suddenly get so much better!
- TD-Linux 12y agoWebRTC actually uses SCTP, but the problem is that SCTP gets filtered out a lot by firewalls and NAT that don't know how to handle it. The solution is to stuff SCTP inside UDP, which works OK because UDP is pretty minimal itself.
- IgorPartola 12y agoDid not know that WebRTC used, it, but did know about the NAT and firewall problem. That's the part I find unfortunate: a reliable general purpose datagram-based protocol is a shoe-in for so many application protocols, yet vendors tend to do bad things like this for no really good reason.
- e12e 12y agoSadly, not just SCTP. Anything not-tcp, not-udp, not-icmp (are there others in common use?) tends to get nuked by firewalls. Great fun if you try to run IPSEC with GRE for example. Really sad to have a protocol number in the IP header, only to have firewalls dropping anything but a few whitelisted ones... :-/ On another note... does anyone know if RDP[1] has seen any use lately? I'm guessing it's pretty redundant vis-a-vis TCP in practice? [1] http://tools.ietf.org/html/rfc908 http://tools.ietf.org/html/rfc908
- colanderman 12y agoDon't forget that SCTP is also multihomed, providing the extra redundancy (though not extra performance) of MPTCP as well.
- shortsightedsid 12y agoCoAP or Constrained Application Protocol for IoT/M2M is being defined by the IETF is on top of UDP. One of the reasons is UDP's simplicity thereby making it easy to implement on microcontrollers. I guess there should be more love for UDP coming.
- _asummers 12y agoThere's currently several proposed RFCs for adding TCP to CoAP. The next IETF meeting should (hopefully) standardize one. One is a pretty naive implementation that adds TCP semantics as an almost wrapper, and another removes the application level ACKs because of the transport level ACK associated with TCP, and several other "well TCP takes care of this for us" sorts of changes. ARM's Sensinode library has the first RFC I mentioned currently implemented, so it's being used in the wild. Once that standardization happens, the OMA LWM2M spec is going to need some revisions, because it's very much written with "CoAP over UDP" in mind. This will ultimately be very good, because it will allow the possibility of other protocols like MQTT, HTTP, etc.
- shortsightedsid 12y agoThere are several alternative transports being proposed (including the 'unusual' CoAP over websockets), but I wonder if they can be implemented with the original constraints of 8bit micros as servers. Maybe its possible, but not sure if there is a need and hence the new TCP proposals.