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…
17 September 2012 at 7:23 pm
Is your WebDAV implementat cross platform?
LikeLike
17 September 2012 at 7:25 pm
Yeah, it’s all Smalltalk code.
LikeLike
18 September 2012 at 2:33 pm
You can write a virtual file system in all Smalltalk code? I’m probably not understanding what this thing really does.
LikeLike
18 September 2012 at 2:36 pm
Yes, if you write a WebDAV server that implements all the appropriate commands, any system that mounts it will treat it as a virtual filesystem. It’s a big enabler!
LikeLike
9 January 2014 at 4:18 pm
[…] 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 […]
LikeLike
22 December 2014 at 2:55 pm
[…] 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 […]
LikeLike