9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] using Tree* and File* vs imlementing own 9p-handling routines?
Date: Thu,  8 Jan 2004 19:37:28 -0500	[thread overview]
Message-ID: <E1AekeZ-000Nam-Pi@t40.swtch.com> (raw)
In-Reply-To: Your message of "Thu, 08 Jan 2004 12:50:52 MST." <d928375478b1619690a5ac9269835f36@plan9.ucalgary.ca>

> I'd like to have a comment from the 9p(2) man page clarified:
>
>           In general, the File interface is appropriate for maintain-
>           ing arbitrary file trees (as in ramfs). The File interface
>           is best avoided when the tree structure is easily generated
>           as necessary; this is true when the tree is highly struc-
>           tured (as in cdfs and nntpfs) or is maintained elsewhere.
>
> Is there a penalty associated with using the File interface?  It seems
> to simplify greatly the implementation of 9p servers, so why should it
> be avoided?

the penalty is that the interface is slightly clunky
and for things with easily generated structure
i've found that using just the qid is easier than
hanging an allocated structure off the aux in the File.
the main overhead is code complexity.

if your tree is fixed then Files are good.
if your tree is a dynamic but regular structure
then it's easier to avoid it.



      reply	other threads:[~2004-01-09  0:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-08 19:50 mirtchov
2004-01-09  0:37 ` Russ Cox [this message]

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=E1AekeZ-000Nam-Pi@t40.swtch.com \
    --to=rsc@swtch.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).