9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Brian L. Stuart" <blstuart@bellsouth.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] QTCTL?
Date: Thu,  1 Nov 2007 04:21:03 +0000	[thread overview]
Message-ID: <110120070421.28207.4729542F0007C92100006E2F22228869349B0A02D2089B9A019C04040A0DBF9B9D0E9A9B9C040D@att.net> (raw)

> If the file is "decent", the cache must still check out
> that the file is up to date. It might not do so all the times
> (as we do, to trade for performance, as you say). That means
> that the cache would get further file data as soon as it sees
> a new qid.vers for the file. And tail -f would still work.

This is really starting to sound familiar.  A couple years ago,
I played around with a caching file system for laptops.  They
always bugged me, because they didn't play nice in a network with
a file server.  So it's meant to operate the same way whether
connected to the file server or not.  On reads, it checks the
file as described above, if connected to the file server.  When
connected, it implements a write-through cache, but records
writes when not connected.  When it connects again, it plays
back the writes, after a little optimizing.  And if the file
has already changed while we were disconnected, I flag it as
a conflict and invoke the powers of a human.

My first playing was in Plan 9, and then with fuse on Linux.
I've been using that version as the primary file system
for my home directory, caching a file server at home and
one at work.  It's not really ready for prime time, but it's
weaknesses are ones that I can live with at the moment.
So I haven't touched it in a while.

But to the question at hand, I never really thought in terms
of it being used for files that didn't connect to persistent
storage.  I always figured the persistent and the non-persistent
would be mostly in different directory trees, so I just ignored
the problem.  Another simplifying short cut was to not try
to implement the network import in it.  It just presents a
cache of one directory tree at another name.  So the authoritative
version is accessed through a normal remote mount.  It makes
some things simpler, but it also keeps it from seeing the
protocol traffic with the server.  In this scenario, it seems
the place to keep a cachability flag would be in the file
metadata, rather than in the protocol itself.  But then again,
my motivation wasn't to improve latency tolerance.

Of course, Russ is right that we can't be sure of coherence
without a way for the server to invalidate the cache of a
file.  But in my case, that wouldn't be available while
disconnected, and the way I use it, conflicts are more
likely when disconnected than while connected.  So I decided
to detect the conflict, rather than prevent it.  That meant
I didn't have to make any changes to the server side and
I could take the shortcut to just map one tree to another.

So this might not add anything to the discussion, but
it'd be nice to account for a wide range of caching
applications.

BLS


             reply	other threads:[~2007-11-01  4:21 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01  4:21 Brian L. Stuart [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-10-31 18:40 Francisco J Ballesteros
2007-10-31 18:56 ` Eric Van Hensbergen
2007-10-31 19:13   ` Charles Forsyth
2007-10-31 19:33     ` Eric Van Hensbergen
2007-10-31 19:39       ` erik quanstrom
2007-10-31 20:43     ` geoff
2007-10-31 21:32       ` Charles Forsyth
2007-10-31 22:48       ` roger peppe
2007-10-31 23:35         ` erik quanstrom
2007-11-01  9:29           ` roger peppe
2007-11-01 11:03             ` Eric Van Hensbergen
2007-11-01 11:19               ` Charles Forsyth
2007-11-01 12:11             ` erik quanstrom
2007-10-31 19:42 ` erik quanstrom
2007-10-31 19:49   ` Eric Van Hensbergen
2007-10-31 20:03     ` erik quanstrom
2007-10-31 20:10       ` Latchesar Ionkov
2007-10-31 20:12       ` Eric Van Hensbergen
2007-10-31 20:17       ` Russ Cox
2007-10-31 20:29         ` Francisco J Ballesteros
2007-10-31 20:48           ` Charles Forsyth
2007-10-31 21:23             ` Francisco J Ballesteros
2007-10-31 21:40               ` Russ Cox
2007-10-31 22:11                 ` Charles Forsyth
2007-10-31 22:26                 ` Francisco J Ballesteros
2007-10-31 22:37                   ` Charles Forsyth
2007-10-31 22:43                     ` Francisco J Ballesteros
2007-10-31 23:32                     ` Eric Van Hensbergen
2007-10-31 23:54                   ` erik quanstrom
2007-11-01  0:03                     ` Charles Forsyth
2007-11-01  1:25                     ` Eric Van Hensbergen
2007-11-01  1:44                       ` erik quanstrom
2007-11-01  2:15                         ` Eric Van Hensbergen
2007-11-01  7:34                       ` Skip Tavakkolian
2007-11-01  6:21                 ` Bakul Shah
2007-11-01 14:28                   ` Russ Cox
2007-11-01 14:38                     ` erik quanstrom
2007-11-01 14:41                     ` Charles Forsyth
2007-11-01 15:26                     ` Sape Mullender
2007-11-01 15:51                       ` Latchesar Ionkov
2007-11-01 16:04                         ` ron minnich
2007-11-01 16:16                           ` Latchesar Ionkov
2007-11-01 16:21                           ` Sape Mullender
2007-11-01 16:58                             ` Francisco J Ballesteros
2007-11-01 17:11                               ` Charles Forsyth
2007-11-01 17:11                                 ` Francisco J Ballesteros
2007-11-01 17:13                               ` Sape Mullender
2007-11-01 17:38                               ` ron minnich
2007-11-01 17:56                                 ` Francisco J Ballesteros
2007-11-01 18:01                                   ` Francisco J Ballesteros
2007-11-01 18:52                                   ` Eric Van Hensbergen
2007-11-01 19:29                                     ` Francisco J Ballesteros
2007-11-01 23:24                                   ` ron minnich
2007-11-01 17:03                           ` Russ Cox
2007-11-01 17:12                             ` Sape Mullender
2007-11-01 17:35                               ` erik quanstrom
2007-11-01 18:36                                 ` erik quanstrom
2007-11-01 17:13                             ` Charles Forsyth
2007-11-01 17:16                               ` Charles Forsyth
2007-11-01 17:20                                 ` Charles Forsyth
2007-11-01 17:52                             ` Eric Van Hensbergen
2007-11-01 18:00                             ` Latchesar Ionkov
2007-11-01 18:03                               ` Francisco J Ballesteros
2007-11-01 18:08                                 ` Latchesar Ionkov
2007-11-01 18:16                                   ` erik quanstrom
2007-11-01 18:19                                   ` Francisco J Ballesteros
2007-11-01 18:35                                     ` Sape Mullender
2007-11-01 19:09                                       ` Charles Forsyth
2007-11-01 19:07                                         ` erik quanstrom
2007-11-01 17:14                           ` Bakul Shah
2007-11-01 16:17                         ` Sape Mullender
2007-11-01 16:27                           ` Sape Mullender
2007-11-01 16:58                         ` Sape Mullender
2007-11-01 16:59                     ` Bakul Shah

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=110120070421.28207.4729542F0007C92100006E2F22228869349B0A02D2089B9A019C04040A0DBF9B9D0E9A9B9C040D@att.net \
    --to=blstuart@bellsouth.net \
    --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).