Subject: Re: network programming
From: (Rob Warnock)
Date: Fri, 14 Dec 2007 00:08:00 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
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. Yes, sending/receiving
*isolated* packets at a *slow* rate on an totally *idle* LAN tends
to be quite reliable, but throw in a few bridges, switches, routers,
VLANs, NAT boxes, flaky NICs, poorly-constructed cables & patch
panels -- all the stuff you find in any *realistic* LAN -- and
the picture is far, far different!! Lost, delayed, duplicated, and
out-of-order packets are all too common on real production LANs.

| TCP on a LAN is serious overkill ...

Again, rubbish. With a single TCP session any modern OS/CPU/NIC
combination can easily saturate even a gigabit Ethernet [~117 MB/s
of user data end-to-end, within 1% of "perfect"].

| ... many LAN applications can make do using the simpler layer 3 IP
| protocol, either by itself or with a custom layer 4 protocol over IP.

Yeah, right. But by the time you finish adding the error-detection,
timeouts [for the errors that *do* happen], and retransmission
policies you'll need for a *real* LAN, you usually would have done
better to just use TCP [or perhaps UDP for VoIP] from the beginning.

I can't count the number of times that people have tried to code up
a "simpler alternative to TCP", only to have it blow up in their faces
and bring their LAN to its knees because they didn't understand
sequencing, flow control, backoff during retransmission, etc.

(*sigh*)  This whole "TCP-on-a-LAN Woozle" seems to need re-slaying
every few years [which says something frightening about the (lack of)
community memory among high-tech folk]. Please recall RFC 872 [only
8 pages], which was already old news when it was published in 1982:
    TCP-ON-A-LAN                           September 1982
    M. A. Padlipsky                        M82-48
    The Mitre Corporation
    Bedford, Massachusetts

    The sometimes-held position that the DoD Standard Transmission
    Control Protocol (TCP) and Internet Protocol (IP) are inappropriate
    for use "on" a Local Area Network (LAN) is shown to be fallacious.
    The paper is a companion piece to M82-47, M82-49, M82-50, and M82-51.

The footnote to reference [3] in the above is most enlightening:

    *  In all honesty, as far as I know I started the rumor that TCP
       might be overkill for a LAN at that meeting.  At the next TCP
       design meeting, however, they separated IP out from TCP, and
       everything's been alright for about three years now--except
       for getting the rumor killed.  (I'd worry about Woozles turning
       into roosting chickens if it weren't for the facts that:
       1. People tend to ignore their local guru; 2. I was trying
       to encourage the IP separation; and 3. All I ever wanted
       was some empirical data.)

Unfortunately, it appears that, despite the best of intentions,
MAP *still* hasn't managed to kill the rumor...  (*sigh*)


p.s. A slight update of RFC 872 [plus a prefacetory afterword]
can be found as the chapter "Slaying the TCP-on-a-LAN Woozle"
in this little classic:

    Padlipsky, M. A., "The Elements of Networking Style and other
    essays and animadversions on the art of intercomputer networking",
    Prentice-Hall (Englewood Cliffs, NJ), 1985,
    ISBN 0-13-268129-3, 0-13-268111-0 (paper).

This self-claimed "world's only known Constructively Snotty computer
science book" is now back in print as ISBN 0-595-08879-1, $19.95, from
[Also see <>.] The "slogans
suitable for framing" in the back are worth the price all by themselves!

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