9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eric Grosse <ehg@research.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rudp
Date: Sat,  8 Sep 2001 12:59:34 -0400	[thread overview]
Message-ID: <20010908165936.CCAAF199E4@mail.cse.psu.edu> (raw)

> From: Sam <sah@softcardsystems.com>
> Date: Sat, 8 Sep 2001 11:48:10 -0400 (EDT)
>
> is there any documentation available for the p9 RUDP (snoopy -r)?

UDP is simple and fast for local communication, but eventually
applications have to come to grips with the fact that it isn't
reliable.  Perversely, errors never seem to show up in initial testing
but as failures in crisis situations.

Plan 9's RUDP is a protocol that delivers packets reliably and in
order.  It is lightweight, without the elaborate congestion avoidance
mechanisms of TCP, and is therefore not suitable for wide-area
applications.  As used in some projects, RUDP is defined as a
new IPv4 protocol type (unofficially assigned 254) but it can as well
be invoked by an application above unmodified UDP.

See the ip(3) man page.   Dave Presotto is the author.

The basic idea is to add a 32-bit sequence number to packets and to
piggyback acknowledgements on replies.  Simple flow control is
achieved by allowing up to 100 unacknowledged packets.  A randomly
initialized "generation number" is made part of the header so that
packets from different conversations are not confused.  If either end
reboots (or if ten retransmissions fail), all queued packets are
dropped but otherwise the conversation continues.  Thus in normal
circumstances, there is a small byte overhead but no extra message
traffic compared to plain UDP.

trivia:
* rudp->headers is usually set to headers=6.  The headers=4 version
was for transition while we still had old codes that assumed IPv4
address lengths.  The headers=0 version is suitable for simple
point-to-point communication, but UDP applications commonly wind up
with multiple clients or multiple servers.
* The random drop feature is purely for testing robustness
in the face of severe packet loss; you can probably ignore it.

Eric


             reply	other threads:[~2001-09-08 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ehg@research.bell-labs.com>
2001-09-08 16:59 ` Eric Grosse [this message]
2001-09-10  1:33   ` Scott Schwartz
2001-09-10 18:58   ` Boyd Roberts
2002-04-15 16:55 andrey mirtchovski
  -- strict thread matches above, loose matches on Subject: below --
2002-04-15 15:31 rog
2002-04-15 15:21 Russ Cox
2002-04-15 14:58 andrey mirtchovski
2001-09-10  1:46 presotto
2001-09-08 17:52 bwc
2001-09-08 15:48 Sam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010908165936.CCAAF199E4@mail.cse.psu.edu \
    --to=ehg@research.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).