9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eris Discordia <eris.discordia@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Do we have a catalog of 9P servers?
Date: Wed, 12 Nov 2008 13:23:51 +0000	[thread overview]
Message-ID: <7D122EF9133395AC4DEA0396@[192.168.1.2]> (raw)

First off, thank you so much, sqweek. When someone on 9fans tries to put
things in terms of basic abstract ideas instead of technical ones I really
appreciate it--I actually learn something. By the way, it is very
interesting how a technical question can be sublimated into a
Gedankenexperiment that even non-technical people can try to take a stab
at. Believe me, such pursuits can be fruitful for the technical people as
well as non-technicals.

>  It has a simple mapping to basic file operations, which makes it easy
> to transparently use on the client side. Aside from the debugging tool
> aux/9pcon, I'm not sure that any plan 9 programs do explicit 9p client
> calls.

That also means _if_ a resource can't be represented well using the
directory/file metaphor you will have to go through some trouble fitting it
into the model. In other words, 9P shouldn't be considered a "fits-all"
solution for problems. That in turn says why other protocols that try to be
"fits-all" solutions end up being complex--it's not because the designers
were dumb or didn't know better, it's because they had a different problem
to solve; namely, the problem of heterogeneity.

>  Could do. However, part of the simplicity of 9p stems from its
> implementation in Plan 9:
> * 9p doesn't need to worry about the details of auth - that's the
> responsibility of authsrv + factotum.
> * 9p doesn't need to support symlinks; the kernel provides that sort
> of functionality through bind.
> * 9p doesn't care about different user id mappings because plan 9 only
> deals with user names (and those are verified by the auth server).

Doesn't that imply, as Roman Shaposhnik pointed out, that 9P's edge is
limited to the Plan 9 implementation? It may be--though I'm certainly not
the one to consult on the subject--that the combination of 9P-esque
simplicity with the natural diversity of platforms is impossible, or very
hard to achieve. Unless, along with suggesting ubiquitous use of 9P one
suggests that everyone should run Plan 9.

>  It doesn't stop at 9p:
> * rc/bc/dc/hoc don't need to implement line editing or tab completion
> because the "terminal" (win from rio/acme) does the job.
> * rc/awk don't need to explicitly support tcp/ip because we have /net.
> * fossil doesn't need hardlinks, since venti coalesces identical data
> blocks. * plan 9 doesn't need to bother with NAT, since you can just
> import /net from your gateway.

This third case, i.e. NAT, is interesting to me. I remember you informing
me some time ago on how Plan 9 could allow a "network transparent sort of
networking." At the time I saw no flaws with that argument. Now I do.
There's a reason for NAT being the way it is.

I understand that if you import a gateway's /net on each computer in a
rather large internal network you will be consuming a huge amount of mostly
redundant resources on the gateway. My impression is that each imported
instance of /net requires a persistent session to be established between
the gateway and the host on the internal network. NAT in comparison is
naturally transient. If at all points in time like half the network's
population is not using any outside world connections then the gateway can
be set up to handle only that much with a little to spare. Importing /net
is very much like tunneling a network protocol in an application layer
protocol, the drawbacks are the same, the advantages, too.

If I knew something of network security I probably could also point out
some serious security flaws in the imported /net model, one of them being
lack of any access control beyond what auth provides which is insufficient
for networking purposes. A firewalled NAT service should be able to
distinguish between real packets from inside the network and packets with
spoofed source address. With an imported /net since there's no packet
rewriting implemented on the network layer (e.g. IP) and because the
"redirection" occurs in the application layer there's no chance of
capturing spoofed packets except with hacking what makes /net tick (the
kernel?). There's also the problem of setting up a DMZ and/or three-legged
firewall with this approach. The "width" of the DMZ is always zero with an
imported /net--the entire DMZ exists within the gateway's kernel (or
wherever in the gateway's memory structures is that /net resides).

>  Just some examples. But you're right, simplicity of design does
> happen elsewhere, but it's less likely to arise elsewhere simply
> because other systems have a lot more crap to deal with. When you're
> stuck with vt100 emulators, of course every shell implements its own
> line editing.

So the gist of this argument is that existing flawed designs are basically
continuations of measures that were previously required by constraints but
are now obsolete, right? Does that mean a new design "from scratch" is
always bound to be better suited to current constraints? Also, if you think
UNIX and clones are flawed today because of their history and origins what
makes you think Plan 9 doesn't suffer from "diseases" it contracted from
its original birthplace? I can't forget the Jukebox example.

>  Much of plan 9's simplicity comes from its structure and consistency.
> Note that all the simplicity gains I've listed come from *removing*
> features. To be able to do that sort of thing it helps to have a
> system where each component meshes well with the other components.
> Everything in its right place, so to speak.

That's the meaning of Rob Pike's "less is more" then. What do you propose
to be done to existing functional and perfectly operable systems? Should
one scrap them to make the scene more consistent?

Consistency comes at a cost. As pointed out previously on this same thread,
in jest though, the Linux community always finds a way to exhaust a
(consistent) model's options, and then come the extensions and "hacks."
That, however, is not the Linux community's fault--it's the nature of an
advancing science and technology that always welcomes not only new users
but also new types of users and entirely novel use cases. What seemed
ludicrous yesterday is the norm today and I must emphasize that this
_doesn't_ mean yesterday was the last day of a "Golden Age." What is the
Plan 9 community's plan for meeting the demands of new types of users? Do
Plan 9's creators/contributors intend to keep it as their darling secret
running for the purposes of research and education occasionally fitting
into some company's (Coraid?) business model or suiting some "big iron's"
(the new BG thing Ron Minnich wrote about) very special design.

>  Does "improve 9p to the point where no one will even minimally
> criticise it" count? :)

It counts but it won't work. At some point the accumulation of changes will
cause 9P to mutate into a new protocol. I suspect that's why 9P's designers
are loathe to "officially" incorporate changes and some 9fans think every
change to the "original" plan is a disaster. Things could get out of
(their) hand(s) that way.

> The problem is it forces the server and client to synchronise on every
> read/write syscall, which results in terrible bandwidth utilisation.

An example of a disease contracted from a system's birthplace.

> 9p is at a disadvantage because it is so general. Having to support
> arbitrary file semantics makes it difficult to come up with any sort of
> safe lookahead scheme to avoid waiting for a network round trip on every
> read()...

Why is there so much emphasis on the "everything-is-a-file" or
"everything-is-a-stream-of-bytes" model? The world is obviously more
diverse than that. Why isn't there provision for file "types" at least
(mknod types b and c come to mind)? Cache viable ones, pass others through.
If a resource is to be represented as file system what could go wrong with
providing the capability in the protocol of representing its minutiae? What
design principles--besides KISS, of course--require bludgeoning every
aspect (read: "file") of a resource into a regular "file?"

>  I'm sure I've missed something, but readahead is safe for all these
> constructs except event files, where if you readahead (and get data)
> but the client closes the file before actually read()-ing the buffered
> data, you really want to tell the file server to "put back" those
> events.

Mark event files by, say, "e" and don't cache them. Or implement "jitter"
control at the cost of extra bandwidth (that's what is currently done in
9P, I presume). Or require the client to announce a live "transaction sum
total" when closing an "e" type file. Or provide a "callback" mechanism for
events that the client actually processes through a control connection and
make the file server record and heed them. Outside of "one world, one
model" paradigms there's no shortage of nearly optimum solutions.

By the way, I believe most "event" files contain mostly "uneventful" data
and only rarely an "event" (e.g. EOF or EOT). So the callback mechanism
might not be as costly as it seems.

And once again, thanks for enlightening me :-)

--On Wednesday, November 12, 2008 1:40 PM +0900 sqweek <sqweek@gmail.com>
wrote:

> On Wed, Nov 12, 2008 at 9:32 AM, Eris Discordia
> <eris.discordia@gmail.com> wrote:
>> And some stuff for troll-clubbers to club me with:
>>
>> 1. What is 9P's edge over text-based protocol X?
>
>  It has a simple mapping to basic file operations, which makes it easy
> to transparently use on the client side. Aside from the debugging tool
> aux/9pcon, I'm not sure that any plan 9 programs do explicit 9p client
> calls.
>
>> 4. Intelligence is not something peculiar to 9fans and the creators of
>> Plan 9. Simplicity of design is not something peculiar to 9P. It could
>> appear out of the blue any day with the latest protocol X.
>
>  Could do. However, part of the simplicity of 9p stems from its
> implementation in Plan 9:
> * 9p doesn't need to worry about the details of auth - that's the
> responsibility of authsrv + factotum.
> * 9p doesn't need to support symlinks; the kernel provides that sort
> of functionality through bind.
> * 9p doesn't care about different user id mappings because plan 9 only
> deals with user names (and those are verified by the auth server).
>
>  It doesn't stop at 9p:
> * rc/bc/dc/hoc don't need to implement line editing or tab completion
> because the "terminal" (win from rio/acme) does the job.
> * rc/awk don't need to explicitly support tcp/ip because we have /net.
> * fossil doesn't need hardlinks, since venti coalesces identical data
> blocks. * plan 9 doesn't need to bother with NAT, since you can just
> import /net from your gateway.
>
>  Just some examples. But you're right, simplicity of design does
> happen elsewhere, but it's less likely to arise elsewhere simply
> because other systems have a lot more crap to deal with. When you're
> stuck with vt100 emulators, of course every shell implements its own
> line editing. Of course utf8+tcp/ip support creeps into every app one
> by one when you don't have a ubiquitous interface to them.
>  Much of plan 9's simplicity comes from its structure and consistency.
> Note that all the simplicity gains I've listed come from *removing*
> features. To be able to do that sort of thing it helps to have a
> system where each component meshes well with the other components.
> Everything in its right place, so to speak. Not that I'm suggesting
> plan 9 is 100% perfect, I'm sure there are shortcomings but it makes
> so much more effort than any other system I've seen as far as elegance
> goes.
>
>> Since protocol X is
>> supposedly new it will break nothing but if it manages to get a foothold
>> by its designers _not_ acting up the way the average 9fan does when 9P is
>> minimally criticized then 9P will be out the window forever. Do you have
>> a solution to that?
>
>  Does "improve 9p to the point where no one will even minimally
> criticise it" count? :)
>  9p certainly deserves some criticism as it stands - its sensitivity
> to latency means it works great on a local network, but poorly over
> something as wide as the internet. Though as Erik pointed out not so
> long ago, this is a limitation plan 9's 9p client code (and probably
> the client portion of every other 9p implementation), not the 9p
> protocol itself. The problem is it forces the server and client to
> synchronise on every read/write syscall, which results in terrible
> bandwidth utilisation. Unless we see some remarkable improvements in
> network technology in the near future, I'd be surprised to see 9p gain
> any foothold outside local networks before this problem is solved (I
> should really take a close look at Op). NFS or something similar that
> is only concerned with serving "regular" files could do a much better
> job here; 9p is at a disadvantage because it is so general. Having to
> support arbitrary file semantics makes it difficult to come up with
> any sort of safe lookahead scheme to avoid waiting for a network round
> trip on every read()...
>  OTOH, I wonder what semantics are generally used... the common sorts
> of files are:
>
> * "regular files" - a persistent array of bytes, whatever you write()
> to a certain offset will show up again when you read() the same
> offset.
>
> * ctl files - write()s are not preserved, but affect the state of the
> file server in some arbitrary way. read()s tend to give some brief
> information about the state.
>
> * event files - read()s block until something interesting happens.
> write()s might allow bi-directional events.
>
> * clone files - a read() of this file creates a new heirachy.
>
>  I'm sure I've missed something, but readahead is safe for all these
> constructs except event files, where if you readahead (and get data)
> but the client closes the file before actually read()-ing the buffered
> data, you really want to tell the file server to "put back" those
> events. Buggerit, I'm stumped already. :S
> -sqweek
>



             reply	other threads:[~2008-11-12 13:23 UTC|newest]

Thread overview: 198+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 13:23 Eris Discordia [this message]
2008-11-12 14:02 ` Charles Forsyth
  -- strict thread matches above, loose matches on Subject: below --
2008-11-21  0:12 Eris Discordia
2008-11-21  0:42 ` erik quanstrom
2008-11-21  7:57   ` Eris Discordia
2008-11-20 22:28 Eris Discordia
2008-11-20 22:42 ` erik quanstrom
2008-11-20 21:35 Eris Discordia
2008-11-19 18:31 Eris Discordia
2008-11-19 20:08 ` Anant Narayanan
2008-11-20  0:00   ` Eris Discordia
2008-11-20  4:55     ` blstuart
2008-11-20  7:44       ` Eris Discordia
2008-11-20 17:34         ` Brian L. Stuart
2008-11-20 18:30           ` akumar
2008-11-20 18:36             ` erik quanstrom
2008-11-20 19:20               ` Brian L. Stuart
2008-11-17  8:42 Eris Discordia
2008-11-17  7:57 Eris Discordia
2008-11-16 18:30 Eris Discordia
2008-11-16 18:08 Eris Discordia
2008-11-16 17:19 Eris Discordia
2008-11-16 16:58 Eris Discordia
2008-11-16 17:17 ` erik quanstrom
2008-11-16 18:01   ` ron minnich
     [not found] <96BA4878DB039F3DAE38CCF2@192.168.1.2>
2008-11-16 15:09 ` sqweek
2008-11-16 17:41   ` Charles Forsyth
2008-11-16 11:39 Eris Discordia
2008-11-16  7:24 Eris Discordia
2008-11-17 10:20 ` Dave Eckhardt
2008-11-17 14:01   ` Eris Discordia
2008-11-17 16:50     ` Dave Eckhardt
2008-11-17 19:45       ` Eris Discordia
     [not found] <FB6D5E99B294E50B901E8872@192.168.1.2>
2008-11-14 18:21 ` Tom Lieber
2008-11-14 18:59   ` erik quanstrom
2008-11-16  2:45 ` sqweek
     [not found] <906EC091083FF0C3C35F51A9@192.168.1.2>
2008-11-16  0:15 ` Felipe Bichued
2008-11-15 22:07 Eris Discordia
2008-11-16  5:27 ` Roman Shaposhnik
2008-11-16  6:19   ` Eris Discordia
     [not found] <DBCC6BB0C82C348357A14A53@192.168.1.2>
2008-11-15 11:49 ` Sergey Zhilkin
2008-11-16  4:31 ` Iruata Souza
2008-11-15 11:21 Eris Discordia
2008-11-15 13:38 ` Gabriel Diaz Lopez de la Llave
2008-11-15 15:30   ` hiro
2008-11-15 20:01 ` Roman Shaposhnik
2008-11-15 22:13   ` Micah Stetson
2008-11-16  5:47     ` Roman Shaposhnik
2008-11-16 19:36       ` Micah Stetson
2008-11-16  6:27     ` Eris Discordia
     [not found]     ` <1282469A8843837F996E64E1@192.168.1.2>
2008-11-16  6:57       ` andrey mirtchovski
2008-11-16 11:45         ` Eris Discordia
     [not found]         ` <D6FDC9E2D78F88C07963DBE5@192.168.1.2>
2008-11-16 12:49           ` hiro
2008-11-16 16:15             ` Eris Discordia
2008-11-16 17:38               ` lucio
2008-11-16 13:25           ` Uriel
2008-11-16 19:46       ` Micah Stetson
2008-11-16 21:24         ` Eris Discordia
2008-11-16 21:52           ` erik quanstrom
2008-11-19  1:59           ` Nathaniel W Filardo
2008-11-20  2:35             ` erik quanstrom
     [not found]         ` <D0E4FEAEC0D3FD307DE41383@192.168.1.2>
2008-11-17  5:12           ` Micah Stetson
2008-11-14 17:29 Eris Discordia
2008-11-14 16:39 Eris Discordia
     [not found] <7D122EF9133395AC4DEA0396@192.168.1.2>
2008-11-13 16:55 ` sqweek
2008-11-13 17:28   ` Brian L. Stuart
2008-11-15  4:12   ` Roman Shaposhnik
2008-11-13 14:25 gdiaz
2008-11-14 16:43 ` Eris Discordia
2008-11-14 17:00   ` erik quanstrom
2008-11-12 21:19 Eris Discordia
2008-11-12 23:11 ` erik quanstrom
2008-11-12 23:51   ` Bruce Ellis
2008-11-13  0:35     ` akumar
2008-11-13 11:58   ` Eris Discordia
2008-11-13 14:17     ` erik quanstrom
2008-11-13 16:22       ` Iruata Souza
2008-11-12 19:08 erik quanstrom
     [not found] <ba5c9f8b914dc6c6d0b4f533d681cda2@quanstro.net>
2008-11-12  5:52 ` sqweek
2008-11-12  5:22 erik quanstrom
     [not found] <150a5464b8f389f1eb92ff001f7d391f@quanstro.net>
2008-11-12  5:17 ` sqweek
2008-11-12  4:50 erik quanstrom
2008-11-09  6:12 erik quanstrom
2008-11-09 13:52 ` Bruce Ellis
2008-11-09 20:39   ` C H Forsyth
2008-11-09 21:57     ` Bruce Ellis
2008-11-07 21:51 Roman V. Shaposhnik
2008-11-07 22:31 ` ron minnich
2008-11-07 23:19   ` Charles Forsyth
2008-11-07 23:45   ` Skip Tavakkolian
2008-11-07 23:51     ` ron minnich
2008-11-08  6:16     ` Bruce Ellis
2008-11-08  7:22       ` Lyndon Nerenberg
2008-11-08  3:43   ` Roman V. Shaposhnik
2008-11-08  3:56     ` ron minnich
2008-11-08  4:29       ` Roman Shaposhnik
2008-11-08 11:39     ` erik quanstrom
2008-11-07 22:37 ` Charles Forsyth
2008-11-07 22:38   ` C H Forsyth
2008-11-08  1:45     ` Roman V. Shaposhnik
2008-11-08 11:47       ` erik quanstrom
2008-11-08 12:11         ` Francisco J Ballesteros
2008-11-08 15:58           ` Charles Forsyth
2008-11-08 17:21             ` Skip Tavakkolian
2008-11-08 18:27               ` Brantley Coile
2008-11-08 18:32                 ` akumar
2008-11-08 18:44                   ` Russ Cox
2008-11-08 23:56                   ` LiteStar numnums
2008-11-08 19:15             ` John Barham
2008-11-08 22:16               ` Roman Shaposhnik
2008-11-08 23:11                 ` erik quanstrom
2008-11-08 23:37                   ` Roman Shaposhnik
2008-11-09 11:26                     ` Steve Simon
2008-11-10  5:50                       ` Enrico Weigelt
2008-11-10  6:17                         ` sqweek
2008-11-10  6:26                           ` Enrico Weigelt
2008-11-10 10:00                             ` Robert Raschke
2008-11-11  2:40                               ` Enrico Weigelt
2008-11-11  2:53                                 ` sqweek
2008-11-10 22:46                           ` Roman V. Shaposhnik
2008-11-10 22:54                       ` Roman V. Shaposhnik
2008-11-10  5:26                     ` Enrico Weigelt
2008-11-10  5:56                       ` Anant Narayanan
2008-11-10  6:18                         ` Enrico Weigelt
2008-11-10 12:11                           ` Charles Forsyth
     [not found]                           ` <4a3bd2fc8118cd88c5bd56605ba6d4e9@terzarima.net>
2008-11-11  2:23                             ` Enrico Weigelt
2008-11-10  6:01                       ` Skip Tavakkolian
2008-11-08 23:36                 ` Mechiel Lukkien
2008-11-08 22:13           ` Roman Shaposhnik
2008-11-08 22:19             ` Bruce Ellis
2008-11-08 22:59               ` Roman Shaposhnik
2008-11-08 23:11                 ` Bruce Ellis
2008-11-08 23:26                 ` ron minnich
2008-11-09  1:12                   ` Bakul Shah
2008-11-09  5:50               ` Skip Tavakkolian
2008-11-09 20:43                 ` C H Forsyth
2008-11-09 22:13                   ` Skip Tavakkolian
2008-11-09 22:21                     ` Bruce Ellis
2008-11-10 21:56         ` Roman V. Shaposhnik
2008-11-10 22:28           ` Anant Narayanan
2008-11-10 23:38           ` C H Forsyth
2008-11-10 23:45             ` Roman V. Shaposhnik
2008-11-11  0:14               ` Charles Forsyth
2008-11-11  1:00                 ` Roman V. Shaposhnik
2008-11-11  1:50                   ` Bruce Ellis
2008-11-11 15:37                   ` Skip Tavakkolian
2008-11-11 16:02                     ` Eric Van Hensbergen
2008-11-11 16:36                       ` Skip Tavakkolian
2008-11-11 16:52                         ` Eric Van Hensbergen
2008-11-12  2:42                           ` sqweek
2008-11-12  3:26                         ` Roman Shaposhnik
2008-11-11 19:18                       ` Bruce Ellis
2008-11-11 19:55                         ` Eric Van Hensbergen
2008-11-11 20:08                           ` Bruce Ellis
2008-11-11 16:30                     ` Uriel
2008-11-11 16:51                       ` ron minnich
2008-11-11 17:01                       ` Eric Van Hensbergen
2008-11-11 17:54                         ` sqweek
2008-11-11 19:46                           ` ron minnich
2008-11-11 20:51                             ` erik quanstrom
2008-11-11 22:33                               ` Eric Van Hensbergen
2008-11-12  0:32                                 ` Eris Discordia
     [not found]                                 ` <D06FA45F8C3E658AA29EAAFD@192.168.1.2>
2008-11-12  4:40                                   ` sqweek
2008-11-11 19:54                           ` Eric Van Hensbergen
2008-11-12  2:11                             ` sqweek
2008-11-12  2:44                               ` Eric Van Hensbergen
2008-11-12  3:51                               ` Roman Shaposhnik
2008-11-12 14:29                                 ` Charles Forsyth
2008-11-12 14:48                                 ` Eric Van Hensbergen
2008-11-12  4:58                               ` ron minnich
2008-11-12  5:20                                 ` Roman Shaposhnik
2008-11-12 17:47                                   ` ron minnich
2008-11-12 19:00                                     ` Uriel
2008-11-12 19:13                                       ` geoff
2008-11-12 19:58                                         ` Charles Forsyth
2008-11-12 19:55                                           ` Brantley Coile
2008-11-12 21:08                                             ` Gorka Guardiola
2008-11-13 16:37                                         ` Dan Cross
2008-11-14  5:52                                           ` Roman Shaposhnik
2008-11-14  8:18                                             ` Steve Simon
2008-11-14 16:35                                             ` Eric Van Hensbergen
2008-11-20 12:08                                             ` Dan Cross
2008-11-20 22:57                                               ` Roman V. Shaposhnik
2008-11-12 19:16                                       ` ron minnich
2008-11-12 19:31                                       ` Eric Van Hensbergen
2008-11-12 21:20                                     ` Roman V. Shaposhnik
2008-11-12  3:40                       ` Roman Shaposhnik
2008-11-11  0:19               ` ron minnich
2008-11-11  0:48                 ` Eric Van Hensbergen
2008-11-11  6:35                 ` Skip Tavakkolian
2008-11-11  2:19           ` Enrico Weigelt
2008-11-11  2:32             ` Lyndon Nerenberg
2008-11-11  6:54             ` Skip Tavakkolian
2008-11-11  8:45           ` Fco. J. Ballesteros
2008-11-11 15:28             ` hiro
2008-11-11 16:25               ` Gorka Guardiola
2008-11-12  1:55             ` Roman V. Shaposhnik
2008-11-12  2:48               ` sqweek

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='7D122EF9133395AC4DEA0396@[192.168.1.2]' \
    --to=eris.discordia@gmail.com \
    --cc=9fans@9fans.net \
    /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).