9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] RPC-esque system calls?
Date: Tue, 24 Jul 2007 07:35:39 -0400	[thread overview]
Message-ID: <36eb46fcbc64dea0ee9499988947e6b3@coraid.com> (raw)
In-Reply-To: <46a5d276$0$36452$4fafbaef@reader5.news.tin.it>

> First of all, we need a means to identify resources, both local ones and
> remote ones.
> The (ssh-like) URI idea seems to be good enough for it.
> 
> cat anne@computer_one:/dev/microphone > anne@computer_two:/dev/speakers
> 
> Ok... it's very naive, I admit; but it's just an example.

plan 9 can already do this

	import computer_one /dev /n/dev1
	import computer_two /dev /n/dev2
	cat /n/dev1/microphone>/n/dev2/speakers
	
> 
> What else do we need?
> 1) A common interface to devices and files (like Plan 9)

it seems you already know 9p can do this.

> The common protocol... well Plan 9 uses 9P, which is very nice, but I have
> a different approach.
> 
> I'd encapsulate messages into SOAP (XML) envelopes.
> 
> This has one big advantage and one big disadvantage.
> Advantage: it has no endianness problems, because it's just text in some
> encoding.
> Disadvantage: it is horrendously inefficient.

i see no advantage as 9p does not have an endian problem.

> However it has also got other nice aspects:
> - it's easy to create new messages: the whole infrastructure is there, you
> just have to generate some XML.
> - [I believe] it is a simple concept to understand
> - [I believe] it is simple to debug (messages are easily interpretable)

9p has these properties.

> Then, the operating system analyzes the message, and it decided whether
> it's a local or a remote operation.
> If it's a local one, it just carries it out and it sends an XML message
> back to the user process, and the C library will just decode it and return
> a value to the user in the standard way.
> Basically... the user doesn't know what's going on under the C API, it's
> transparent (as much as possible).
> 
> If it isn't a local operation, the kernel acts as a proxy and forwards the
> request to the target host, which in turn will realize it's a proxy
> operation and it will return values back to the caller.

this sounds like a vague discription of a process' mount table.

> 
> The key concept is:
> what you can do locally you can also do remotely.
> 
> ...by virtue of making it the *single* way to access the kernel.
> So you can't say: "this is going to be implemented for the local interface
> only... we'll take care of the remote one afterwards", no way.

perhaps some of the papers  here (http://plan9.bell-labs.com/sys/doc/)
would be helpful.  i'd start with _the organization of networks in plan 9_.

- erik


  reply	other threads:[~2007-07-24 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 11:03 Francesco Frigo
2007-07-24 11:35 ` erik quanstrom [this message]
2007-07-24 13:24 ` Uriel
2007-07-24 13:46   ` Lluís Batlle
2007-07-24 13:49   ` tlaronde
2007-07-24 14:19 ` [9fans] " Francesco Frigo
2007-07-24 15:07   ` C H Forsyth
2007-07-25 13:47   ` Joel C. Salomon
2007-07-25 13:54     ` C H Forsyth

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=36eb46fcbc64dea0ee9499988947e6b3@coraid.com \
    --to=quanstro@coraid.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).