concept: the active filesystem

The Spoon history memory’s embedded webserver presents the object memory as a WebDAV filesystem. Classes appear as directories, and methods appear as files in those directories. Developers can mount the filesystem so that it appears normally with the other volumes on their operating system. Because of this, they can also use familiar file-based tools like file browsers and text editors to interact with it. When a file is written with one of these tools, the corresponding method is compiled and installed in the running system. Other side effects can be associated with special locations in the filesystem; for example, when a special “do it” file is written, the expressions in it are evaluated and the answer is written to another special file.

This is an example of an active filesystem: a virtual filesystem with behavior associated with its typical operations. Since the WebDAV server is a Spoon app, we have complete control over the way a virtual filesystem interacts with a user. In particular, we can support commodity tools.

I’m making another active filesystem for the InnoViz project in Amsterdam. This one behaves as a general-purpose database. The class hierarchy still appears as directories, but the methods do not appear. Instead, each class can contain subdirectories representing queries on objects in the database. A query directory contains files indicating the code run by the query, and the objects answered by it. Since queries are just another part of the filesystem, they are persistent and can be reused in another queries by multiple authors. This enables a form of collaborative query.

Users need not be programmers in the traditional sense in order to interact with the database. For example, one may add a new object to the database by editing the another object’s file and saving it under a new name. Still, users who know how to write programs can also interact with the database with their favorite language, they only need to know how to read and write files.

I’m looking forward to finding more use cases for active filesystems…

6 Responses to “concept: the active filesystem”

  1. Is your WebDAV implementat cross platform?

    Like

  2. […] Spoon app is now mountable as a virtual (WebDAV) filesystem. What should it do? It has a file at the top level called “README.html”, which is […]

    Like

  3. […] what Context is, and enables control of the memories it knows about. The webserver also provides an active filesystem via WebDAV. This lets you interact with the console from a host terminal or text editor, in a […]

    Like

Leave a comment