[MUD-Dev] UDP Revisted

Bobby Martin bobbymartin at hotmail.com
Fri Oct 12 14:47:52 CEST 2001


> From: Brian Hook <public at pyrogon.com> 

> Adding a reliable transport layer on top of UDP isn't that
> difficult (anyone seriously working on this stuff should, at the
> very least, have a copy of Unix Network Programming by Stevens),
> and TCP performance is fairly slow and unpredictable.  From
> talking to

Can you give me some references on why you think a reliable
transport layer on top of UDP would perform better than TCP?  I am
running an open source java project (ARMI) that I originally
intended to use UDP.  I had some ideas of what I would do to make
transport reliable, then when I investigated TCP it appears to do
pretty much exactly what I had planned, with some improvements.

There are only two real reasons I'm seeing now to use UDP instead of
TCP for java:

  1) TCP 'plays nice', not congesting connections by hogging
  bandwidth

  2) TCP requires one thread per client in Java.  There are some
  workarounds, but they perform very, very abysmally.

1) is not a problem, I don't think abusing my connection at the
expense of other apps will help enough to be worthwhile for my
applications.

2) is a big problem, since one of the things for which I'm using
ARMI is a MMORPG.  Java 1.4 appears to address the problem with
java.nio.channels, though, and I can limp along between now and then
with either regular java TCP Sockets or with a JNI implementation
that delegates to a C/C++ TCP sockets library.

If you can point me at some information that indicates I can do appreciably 
better than TCP, I would appreciate it.

Bobby
_______________________________________________
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