[<<][plt][>>][..]
Mon Jun 15 17:10:52 CEST 2009

Unix utilities

I'm looking for a way to easily abstract unix unitilities as Scheme
functions, in a way that abstracts the use of the filesystem.

The idea is simple: 

  * keep a 1-1 map of objects managed in the Scheme memory model, and
    data stored on-disk.

  * provide a mechanism for external programs to access the files:
    external programs are modeled as "directory transformers".

  * tie into the Scheme GC using 'register-finalizer

  * add a storage size monitor to trigger global GC.

The way to do this is to manage all files in temporary storage, and
move files around into temporary directories that are the "context" of
the external programs.

In general, files are owned by Scheme, and essentially invisible to
the external world, until they are made available during a "procedure
call".  Note that this mechanism doesn't work for files that are
accessible from the outside.  (However, filesystem reference counts /
hard links can be used for this).

Since files are now tied into the global garbage collection mechanism,
they are subject to long life if collection doesn't get triggered.
Therefore on each operation we might want to keep track of the size of
the files, and trigger a collection whenever a preset limit is
reached.



[Reply][About]
[<<][plt][>>][..]