Skip to content

User Space Filesystems and URL Routing

by C. Ross Jam on July 16, 2010

Nice post by Evan Broder discussing an interesting approach to implementing user space file systems. The key trick is to treat filesystem request handling similar to URL request routing.

Linux, and other UNIX like operating systems, have long had support for implementing

filesystems in user space. This allows hackers to hide all kinds of interesting computation and services behind a (the?) core UNIX abstraction. Performance and support (a.k.a. FUSE) on modern machines has gotten so good, you can even implement filesystems using Python.

As part of implementing the filesystem, a module has to translate request against pathnames into responses. Sounds remarkably familiar. HTTP servers have to do the same thing. Even better, web application frameworks and stacks like Djangon and Ruby on Rails do as well. Thus, there’s been a significant amount of effort put in by the developer community to come up with idiomatic ways to cleanly and flexibly deal with this dispatch. For example, Python’s Routes module.

Smooshing the URL routing concept into FUSE support leads to RouteFS, “A FUSE API wrapper based on URL routing”. Broder then goes on to demonstrates a toy virtual filesystem that accesses github, but also points to his virtual machine work on Invirt as a more serious usage of the approach.

Moby hack!

From → Uncategorized