by e12e · 13y ago · 0 comments
Especially:
"Obviously, the right solution would be implement a new transport protocol directly on top of IP protocol, one that would provide desired functionality — failure detection and/or multiplexing — directly, without duplicating the features.
And, as a matter of fact, the above was already done. The protocol built directly on top of IP with both heartbeating and multiplexing is called SCTP and is available out of the box in most operating systems.
And here comes the problem: SCTP is not used, even for projects where those features are needed. Instead, they are lousily re-implemented on top of TCP over and over again."
(Not necessarily saying that SCTP would be the best fit for games, more the general point -- that there's room for more than just TCP and UDP on top of IP -- and also that that might not work, due to firewalls and routers refusing to route anything that's not TCP or UDP).
There are two real reasons, the first and most important is that Microsoft never implemented SCTP. Apparently there was not enough customer demand, but that's a lousy excuse, I'm not sure what the real reason is. Perhaps they just have no one thinking about networked applications besides the Web at the moment. Sadly lack of forward thinking is something that bugs the Windows team a lot I feel. The second reason can be partly blamed on Microsoft as well, but most network devices operating at the transport layer have difficulty with SCTP. Why implement it when no one uses it right? just like IPv6 support. Anyway, apparently the difficulty lies with checksumming packets, which requires some more memory than is necessary for TCP/UDP.
It's a shame really. I think you can safely say that SCTP is the perfect gaming protocol. It supports almost all features gaming networking libraries usually implement on top of UDP just by configuring your streams.
If you found out about the wide range of networking protocols and services they provide in Windows, you wouldn't feel that way. For example, P2P. A few years ago, while working on P2P applications, we discovered Microsoft has a lot of technologies in that area. Things like Teredo (IPv6 transition and NAT traversal) and a complete P2P networking API -- which gives you encryption, self-organizing overlays and DHTs out of the box -- have been around since around 2001, and have been built into Windows since Vista. They also had lower level protocols for things like link-layer topology discovery and automated device (printers, etc) configuration.
Almost all proprietary stuff, of course - except Teredo, which has an RFC and an open source implementation - but quite interesting nonetheless. We talked to the team working on this, and they claimed it was even being used by some customers in 1000+ machine deployments.
For some reason, these things are not widely marketed. Maybe because it's a niche market. However, I wouldn't say they're not forward-thinking, at least when it comes to networking.
sctp's achilles heel is its inability to work with NAT. It was designed to not work with NAT. NAT has since become widespread especially for connecting homes and sctp ended up not being so.
Well, shit.
https://docs.google.com/document/d/1RNHkx_VvKWyWg6Lr8SZ-saqs...
Heck, maybe we should even reimplement TCP on top of UDP (stripping out the redundancies, so UDP carries the ports and checksum), and then just consider UDP an L3 protocol--a bit of extra stuff you get with every IP packet, whether you want it or not.
If we can figure out a way to do implicit protocol negotiation, such that we can build both clients and servers that "prefer" TCPv2-over-UDP but will drop back to plain-TCP, this could really happen, and we might get to start writing new transport protocols again. (Heck, for that matter, DTLS might finally get used.)
See also: the comment by eternaleye on the above post http://250bpm.com/blog:22/comments/show#post-1759542
If "The world is on fire because we're almost out of addresses" doesn't get residential ISP's to support another protocol for home users (IPv6), somehow I doubt "We can improve the performance of online games that work reasonably well right now" will convince them to support SCTP.