[tahoe-dev] FUSE/SFTP (was: plugin architecture for tahoe?)

Brian Warner warner at lothar.com
Wed Sep 8 15:52:18 UTC 2010


On 9/7/10 2:05 PM, Greg Troxel wrote:
> 
> wrt. sftp, I'd like to see a fuse (high-level api) client.  but i
> haven't the spare time to hack on it.

Incidentally, I originally put more energy into SFTP than into a direct
FUSE frontend because there's a good FUSE-to-SFTP layer for all the
platforms. So it seemed like the easiest way to provide FUSE access to
everyone.

Allmydata had a "WinFUSE" frontend (really SMB based internally), I
think the code might still be available, but it was never really
suitable for merging into the tahoe process directly (I think it ran as
some sort of external service). Linux FUSE speaks through a pipe, so
it's easier to imagine putting the handler directly into Tahoe (it could
be pure-python), but the existing libraries were pretty thread-centric
and also assumed that the FS process was invoked (as root!) when the FS
was mounted, whereas we'd want the tahoe process to receive a message
that says a FS has been mounted and to please start speaking the
protocol. OS-X FUSE (which is supposed to be source-code compatible)
probably works in a similar way. Rob Kinninmont worked in this space for
a while, with the "blackmatch" code.

So I imagined that writing a "proper" FUSE frontend would involve
writing new message-handling libraries, and would take a while, so SFTP
would get us more bang-for-the-buck. It's a pity that it has such
annoying dependencies, though.

Both SFTP and FUSE have to deal with the big impedance mismatch between
tahoe (immutable files) and POSIX (stat/open/seek/read/write/close), by
stashing the temporary mutable file in a cache somewhere and flushing it
upon close. David-Sarah's more-complete SFTP work goes to great lengths
to accomplish this, and a "real" FUSE frontend would have to do just as
much work.

But, it'd be nice to have, especially if we could pull it off in
pure-python and without dragging in more libraries. The result would
probably only work on linux, OS-X, and the BSDs, though.

cheers,
 -Brian


More information about the tahoe-dev mailing list