[MUD-Dev] UDP Revisted

Travis Nixon tnixon at avalanchesoftware.com
Mon Oct 15 13:06:39 CEST 2001


From: "Brian Hook" <bwh at wksoftware.com>
> At 02:47 PM 10/12/01 +0000, Bobby Martin wrote:

>> Can you give me some references on why you think a reliable
>> transport layer on top of UDP would perform better than TCP?

> Nope.  I'm going based on the opinions of people I trust a lot in
> this field.  I'm not even sure that UDP w/ reliable transport IS
> any better than TCP, except for the fact that in a 3D world you
> don't need reliable data that much.  So UDP is much faster because
> of its unreliability, and you can then just stick in the
> occasional reliable packet.  That alone makes it worthwhile.

I haven't ever seen anybody actually state this, but I've managed to
convince myself that the reason so many want to implement
reliability on top of UDP is not because they all think they can do
better than TCP in that respect, but because TCP implements
something else on top of that reliability.  It not only guarantees
that packets will arrive (or the connection will be given up on), it
also guarantees that they will arrive in the order that they're
sent.  So, if a packet gets lost somewhere, not only do you have to
wait for the data from that packet, you also have to wait for the
data contained in any packets that were sent after that one, even if
they've already arrived.

Considering the time sensitivity of most of the information
transmitted by a game, that seems a little excessive.  Lost packets
are pretty well unavoidable.  It's going to happen, regardless, so
you try to design around it.  But if delayed packets cause more
problems than non-delayed packets, then you almost certainly want to
keep packets from being delayed whenever you can.

Therefore, you see lots of people who want to implement reliability
on top of UDP, but I have never ever seen anybody who wanted to
implement reliable in-order delivery over UDP.  :)

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list