The Future Is FUSE

Posted: Mon, 23 January 2006 | permalink | No comments

Well, probably not, but it's a nice catchy headline. <grin>

What I do think is that there is a pile of unexplored functionality hiding in mapping more things to regular filesystems. FUSE has lowered the barrier to providing access to non-traditional filesystem places -- there's versioned filesystems, SFTP (of the SSH variety) filesystems, filesystems into tarballs and zip files, and so on.

Implementing a FUSE filesystem is as simple as whipping up a few callback methods in your favourite programming language (the native bindings are, of course, in C, but there's FUSE libraries for Python, definitely, and I'm fairly sure I've seen Perl and Ruby ones as well) to implement things like stat, open, read, and so on. Then you run the program as per normal and suddenly you can read and write things you've *never* read or written before...

Beyond the mundane extensions of reality listed above, there's whole new vistas of relatively unexplored territory for filesystem-like operations, which are (a) waiting to be explored, and (b) much easier to implement due to the fun of FUSE.

For example, SQL databases are very hierarchical in nature. Databases contain tables which contain rows which contain fields which contain values. If you can track your foreign keys, some of those values can be symlinks/directories to other records, or a directory of records for join tables. Sure, it's horribly inefficient to update whole tables by for i in *; do echo 12 > $i/fieldname; done, but at the very least it could be an interesting way of viewing data, and with some judicious caching (depending on use-case) the performance could probably be made half-sensible.

A more refined version of this is the idea of reporting into pseudo-flatfiles. Imagine if you could open a file and have a spreadsheet of all of your data. With FUSE, it's possible.

A killer one that my boss Dave Kempe came up with is a search filesystem -- you create a directory in this FUSE filesystem that is named after a search query -- perhaps "2005 financial". A Google Desktop-style search then results every time you enter that directory, and all matching files are available for your viewing pleasure. I understand that gmail works something like this "virtual folders with search" model, and I know that applications like Evolution and Liferea already have some sort of virtual folders type of thing, but we don't think that anyone's written something like this for filesystems. Considering that you can run a FUSE filesystem over Samba, you can easily have a company-wide document search-and-retrieval with persistent (and shared) queries, which is probably a pretty valuable thing.

Even all of these, though, are relatively tame ideas when weighed against the myriad of things that my tiny mind can't even dream up. I don't think people have put much thought into how far a filesystem really can go, because before FUSE, if you wanted to write a filesystem, you were pretty much restricted to kernel-mode programming -- a very limited (and dangerous) world for your average application programmer.


Post a comment

All comments are held for moderation; markdown formatting accepted.

This is a honeypot form. Do not use this form unless you want to get your IP address blacklisted. Use the second form below for comments.
Name: (required)
E-mail: (required, not published)
Website: (optional)
Name: (required)
E-mail: (required, not published)
Website: (optional)