4 ms·
Years ago, i read about some application protocol (for a game, i think) that sat on top of UDP. It packed small messages into datagrams for transmission, and ha
by twic 13y ago
Years ago, i read about some application protocol (for a game, i think) that sat on top of UDP. It packed small messages into datagrams for transmission, and handled acking and redelivery.
One of the cute things it did was improve reliability for critical messages by preemptively sending them twice, in successive datagrams. That allowed the protocol to avoid an ack-miss-retransmit cycle for those packets, as long as it was only a single datagram that was dropped.
- sillysaurus3 13y agoIt's the Quake 3 network protocol. Carmack invented it, and that protocol was the first one to solve the UDP ack problem in a way that didn't impact gameplay. It was a huge deal and was probably one of the reasons the Quake 3 engine generated over a billion dollars in revenue.
- lerno 13y agoNot Q3. Q3 has a more elaborate scheme, keeping more updates in the resend buffer.
- sillysaurus3 13y agoYou rock! Thanks for correcting me and for pointing out this wonderful read in your other comment: http://www.gamasutra.com/view/feature/131781/the_internet_sucks_or_what_i_.php?print=1 http://www.gamasutra.com/view/feature/131781/the_internet_su...
- barbs 13y agoA neat write-up of the algorithm used can be found here: http://fabiensanglard.net/quake3/The%20Quake3%20Networking%20Mode.html http://fabiensanglard.net/quake3/The%20Quake3%20Networking%2...
- lerno 13y agoX-Wing vs Tie Fighter, a classic read on networking over the internet: http://www.gamasutra.com/view/feature/131781/the_internet_sucks_or_what_i_.php http://www.gamasutra.com/view/feature/131781/the_internet_su...
- twic 13y agoI don't think that was it. They sent the whole of every datagram twice: > Our solution was simple and surprisingly effective. Every packet would send copy of the last packet. This way if a packet were dropped, a copy of it would arrive with the next packet, and we could continue on our merry way. This would require nearly twice as much bandwidth, but fortunately our system required so little bandwidth that this was acceptable. This would only fail if two consecutive packets were dropped, and this seemed unlikely. If it did happen, then we would fall back on the re-sending code. The protocol i remember specifically send some parts of datagrams, the most critical messages, twice.
- patrickmcmanus 13y agoThat's a variation of FEC and its good stuff http://en.wikipedia.org/wiki/Forward_error_correction http://en.wikipedia.org/wiki/Forward_error_correction we're seeing it come back into vogue in TCP and modern protocols. QUIC has a FEC component and TCP Tail Loss Probe (http://www.ietf.org/proceedings/84/slides/slides-84-tcpm-14.pdf http://www.ietf.org/proceedings/84/slides/slides-84-tcpm-14....) is a subtle variation on the theme too the million dollar question around FEC is how correlated are different loss events which has a lot to do with how well it can work.
- twic 13y agoI guess it's a kind of FEC. To me, FEC usually means that (a) the error-correction information is smaller than the message it covers and (b) the error-correction information is included in the message it covers. The Header Error Control field in an ATM cell is the canonical example for me. But, yes, sending duplicates in another datagram does allow errors to be corrected without being reported to the sender, so it corrects errors in a forward direction, which i suppose makes it FEC. That Google tail loss stuff is nice, thanks for the link. It's cool that thirty years after RFC793, we're still making significant improvements to TCP.
- stephen_g 13y agoThat's just FEC with a code rate of 1