9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] p9p factotum available for plan 9
Date: Fri, 12 Nov 2010 14:30:11 -0600	[thread overview]
Message-ID: <AANLkTi=AEYMTsjmJuen2PzhcErWcjLnj73tdWsPaKCVK@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=tiVM-irt0L-bqiM-jmpAQ1TU8sz-C2zL9bFFy@mail.gmail.com>

On Fri, Nov 12, 2010 at 1:55 PM, ron minnich <rminnich@gmail.com> wrote:
>
> That might work but Plan 9 servers currently silently discard T
> messages they don't understand, so this way of determining server
> capabilities can't be used.
>

Silent discard is a bit unfriendly and likely to hang the client.
Returning Rerror for any T message you don't understand is a bit more
friendly (and is what is written in the .L proposal).

> My impression is that if you see .L, then extra operations are
> supported and you assume they'll work; is that true?

Not really, the intent was that servers could implement a subset of
the .L features, and return Rerror for any that they don't.  The
intent was so that a client could degrade gracefully or report lack of
features back to the application/user.  The current client and server
for .L (that I'm aware of) doesn't do this yet (it is still in
development), but that is the intent.

>
> There are other issues with the versioning mechanism however. What if
> a server supports capabilities of two versions, e.g. .L and .op? Do we
> reply
> 9p2000.L+9p2000.op
>

That isn't currently supported by anything (that I am aware of),
although I imagine the right response woul dbe 9p2000.L.op.  Of
course, the op guys specified their stuff as an entirely different
protocol, so not currently a problem.

> It seems we made the first real test of versioning with .u and things
> did not go as we hoped ...

Well, the .u was a "clumsy" design intended to have minimum
interference, but in fact changed the size of certain protocol
messages which really threw a monkey wrench into certain clients or
servers.  The first test of the version stuff was 9p versus 9p2000,
and that worked just fine, but I don't think much was done to test
outside of these two conditions.

>
> As for the uid/gid mess, the simplest way out it seemed to me was to
> send the numbers as strings; done. People can just put the strings for
> the numbers in /etc/passwd; that's what I did anyway.
>

Doesn't really work in multi-account environments where uid on one
system doesn't equal uid on the other system.  Also introduces
potential parse problems.

> And, finally, errno and errstr. Plan 9 speaks strings, Unix integers,
> Windows strings IIRC. The solution for unix clients was reverse
> mapping of errstr to errno, which has not worked well for me. I'd
> still prefer the format I used before:
> sprint(rmsg.error, "%d:%s", errno, errstr);
> and let the client figure out which of these two things it wants.
> Obviously useless for Plan 9 servers but very useful for *nix
> clients/servers, which only want to talk errno. Even if the Plan 9
> client sees an errstr in the number:message format, that could be
> helpful to users.

More or less what we did in .u (it had both, just not in the same string).

In any case, if you are talking to Plan 9, you talk 9P2000 and
everything is as it should be except errors are a little funny.
If you are talking to Linux from Plan 9, you talk 9P2000 and get by.
If you are talking Linux<->Linux then you really should use the Linux
native structures, ids, errcodes, etc.  This is the .L path.

Hey man, IIRC you were Lucho's boss when he did the .u implementation
-- so it's all your fault :P

         -eric



  parent reply	other threads:[~2010-11-12 20:30 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 21:13 erik quanstrom
2010-11-09  3:37 ` erik quanstrom
2010-11-09 17:41   ` David Leimbach
2010-11-09 17:51     ` erik quanstrom
2010-11-10  0:37       ` erik quanstrom
2010-11-10  1:49         ` Russ Cox
2010-11-10  6:46           ` erik quanstrom
2010-11-10 14:31             ` Russ Cox
2010-11-12  3:35               ` Noah Evans
2010-11-12  5:34                 ` erik quanstrom
2010-11-12  5:46                   ` Noah Evans
2010-11-12  6:03                   ` Noah Evans
2010-11-12  6:19                     ` Russ Cox
2010-11-12  6:25                       ` Noah Evans
2010-11-12  9:07                       ` EBo
2010-11-12 15:12                         ` David Leimbach
2010-11-12 15:19                       ` Eric Van Hensbergen
2010-11-12 15:35                         ` erik quanstrom
2010-11-12 15:55                         ` Russ Cox
2010-11-12 16:22                           ` Eric Van Hensbergen
2010-11-12 19:55                             ` ron minnich
2010-11-12 20:23                               ` erik quanstrom
2010-11-12 20:31                                 ` Eric Van Hensbergen
2010-11-12 20:37                                   ` ron minnich
2010-11-12 20:30                               ` Eric Van Hensbergen [this message]
2010-11-12 20:41                                 ` ron minnich
2010-11-12 22:15                                   ` Eric Van Hensbergen
2010-11-12 22:20                                     ` ron minnich
2010-11-12 22:36                                       ` Russ Cox
2010-11-13  8:31                                       ` tlaronde
2010-11-13 23:42                                         ` Dave Eckhardt
2010-11-14 22:49                                       ` Nathaniel W Filardo
2010-11-15 16:22                                         ` erik quanstrom
2010-11-15 17:40                                           ` Nathaniel W Filardo
2010-11-15 17:50                                   ` John Floren
2010-11-12 21:12                               ` Russ Cox
2010-11-09 18:08     ` yy
2010-11-09 19:17     ` Bakul Shah
2010-11-09 19:27     ` Russ Cox

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='AANLkTi=AEYMTsjmJuen2PzhcErWcjLnj73tdWsPaKCVK@mail.gmail.com' \
    --to=ericvh@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).