lab 23 - tickfs

NAME

lab 23 - annotating a file system

DESCRIPTION

i have tried out some experiments with annotating the filesystem; really, several iterations of the same idea.

my latest attempt is tickfs, which i think comes close to doug mcilroy's idea of a metadata file system.

each file served by tickfs is a binary relation, the key is usually an absolute pathname, and the attribute is defined by the name of the relation. each relation is also bi-temporal. it's a historical record of changes to each key, value pair and it determines whether a key, value pair is true at a given time.

adding metadata is simple,

      % echo ${quote i . /doc/sh.ms 'the inferno shell' } > /n/tickfs/desc
      % echo ${quote i . /doc/sh.ms 'rogger peppe' } > /n/tickfs/author

the dot indicates the current time, but any time represented as seconds since the epoch can be given.

queries are pipelines,

      % 9ls sh.ms |taq /n/tickfs/author |taq -j /n/tickfs/desc

the query uses the timestamp of the files to return the currently effective values for the attributes 'author' and 'desc'.

it relies on a disciplined user to maintain a single logical namespace and to keep it consistent with the namespace of keys within tickfs. plan9 and inferno make it easy to alter the namespace; but the discipline of arranging a clear, consistent namespace is harder.

an example that includes fossil is to bind a directory from dump over the logical namespace. the currently effective values will likely vary over time, and so obtain different results from tickfs.

             % 9ls /doc |taq /n/tickfs/desc
             % bind /n/dump/2004/0101/doc /doc
             % 9ls /doc |taq /n/tickfs/desc

also, i have tried indexing file contents within tickfs, so combinations of keyword search and named descriptors can be used

      % search bug |taq /n/tickfs/author |grep caerwyn |taq /n/tickfs/desc

tickfs runs on inferno, but lookfs, which is an earlier iteration using libstyx, is very similar and should run on plan9.

FILES

The source for this lab is in the archive on my homepage.

Comments

Popular posts from this blog

lab 110 - inferno archive edition

lab 111 - wavloop

lab 107 - midiplay