Subject: Re: network programming
From: (Rob Warnock)
Date: Fri, 14 Dec 2007 22:39:26 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Kent M Pitman  <> wrote:
| (Rob Warnock) writes:
| > George Neuner  <gneuner2/@/> wrote:
| > +---------------
| > | AFA sockets are concerned: TCP is a very heavyweight layer 4
| > | protocol designed for unreliable wide area networks.  On a LAN,
| > | the odds of a packet being lost or arriving out of sequence are
| > | virtually non-existent ...
| > +---------------
| > 
| > **BULL!!**  Sorry for shouting, Sir, but this assertiong shows an
| > almost complete lack of real-world experience.
| Heh.  Sounds a bit like
|   (sublis '((c-or-fortran-program . ip-application)
|             (common-lisp          . tcp))
|           (tenth *greenspun-rules*))

Exactly so! [...even if it took me a minute to parse your SUBLIS.]  ;-}

And that was also basically one of the main points of RFC 872:
    So if all you want is the ability to demultiplex data
    streams from your Host-Host protocol, you use UDP, not TCP.
    ("You" is usually supposed to be a Packetized Speech
    protocol, but doesn't have to be.)  (And we'll worry
    about Flow Control some other time.)
    A word of caution, though:  those applications probably
    will need protocols of some sort--and they'll probably
    need some sort of Host-Host protocol under them, so
    unless you relish maintaining "parallel" suites of
    protocols....  that is, you really would be better off
    with TCP most of the time locally anyway, because you've
    got to have it to talk to the catenet [read: "Internet"]
    and it's a nuisance to have "something else" to talk
    over the LAN--when, of course, what you're talking requires
    a Host-Host protocol.

In fact, about the only thing that has changed since RFC 872
was written in 1982 is that TCP implementations have gotten
*so* much faster that it is very difficult to find a NIC and
LAN that *won't* run at "wire speed" on a LAN. As I said before,
most OS/CPU/NIC combos will saturate a GbE [~117 MB/s user data]
with a single TCP connection. Many higher-speed LANs have reported
TCP running at a substabtial fraction of wire speed: (1) SGI's
MIPS/Irix TCP ran at 550 MB/s over its 800 MB/s GSN [a.k.a.
ANSI HIPPI-6400]; (2) I've personally seen 380 MB/s of
TCP-over-Infiniband (4xDDR/Linux/Opteron), and subsequently
been told that that was "slow".  ;-}

So, yes, IMHO the flavor, at least, of your SUBLIS is correct.
[Modulo the bit about IP/UDP sometimes being the "right" answer...]


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607