by ehsanu1 · 15y ago · 0 comments
(Or does the construction that immurray described benefit from domain knowledge about the underlying data?)
https://secure.wikimedia.org/wikipedia/en/wiki/Transport_lay...
In addition to that list, there are µTP and rpp, plus others no doubt.
I guess the argument is that a scheme based on UDP can have very low latency a lot of the time, only occassionally stalling while waiting for more data. Whereas TCP, which needs acknowledgements and to keep packets in order, has a uniformly high latency. For this particular type of application, the tradeoffs are different from typical internet use?
I am surprised how infrequently RTP comes up in these conversations. Something close to RTP seems like it would be ideal for games.
Absolutely. The value of any one packet is fairly low, you can interpolate the player's path, hell, maybe no one else was looking at him at the time. But with TCP, you basically stop the world for a couple roundtrips to make sure you have that packet, so all the packets you received after the original drop and before the retransmission are no longer useful, and you have to drop them too.
It's also worth noting that TCP does /not/ have a uniformly high latency, it does the sawtooth thing. In other words, if Level3 decides they're going to shovel a bunch of your ISP's traffic into the bitbucket for a second, your packets have been dropped, the server is going to wait until it has a complete set of packets, and your TCP implementation has decided to throttle the number of packets you can send to catch up.
We can do much better than TCP. We just have to weaken the reliability requirement. And like you say, in the real world, that can go quite a long way, without actually being much weaker than TCP.
(I too would love to hear first-hand experience of anyone who's used this type of code.)