Let's begin SchemeOS

Chris Bitmead chrisb@ans.com.au
Sun, 22 Mar 1998 16:09:09 +0000


> Well, it doesn't make sense to go into this whole debate again, but I
> think you've misplaced the "blame" for Unix's hassles. The problem is
> not that Unix has a filesystem, but that software usually stores
> information in that filesystem in random, incompatible file formats with
> no natural mapping to memory objects. On a system with a file system
> where the files are persistent objects, I can do this:
> 
> (define bad-guys (read-file "/etc/bad.lsp"))
> (define users (read-file "/etc/passwd.lsp"))
> (write-file
>      (filter
>          (lambda (x) (member x bad-guys)))
>      "/etc/passwd.lsp")
> 
> Even Unix allows this!

If you do the above, then I guess you have an object file system,
albeit one that is

a) inefficient - presumably the .lsp files are ascii text
b) not at all transparent. Every load and store has to be
explicit, which kinda defeats the purpose. Say goodbye to all
that elegance.
c) Not very practical - you can't have object references that
cross the boundary between one file and another file. This is a
big killer.
d) Not convenient. You would have to decide on some arbitrary
break down on how much  to store in one  file.

Your above example in SchemeOS with persistent store file system
would look something like this I guess...

(set! *user-list* (filter (lambda (x) (member (name x)
*bad-guys))) *user-list))

Even just this one example shows the amount of unnecessary crud
that can be gotten rid of.

Once you realise that everything should be a lisp object (you
seem to have realised that already), there becomes this arbitrary
problem of which   objects to store in which file when using a
UNIX file system. If you have a mail folder with mail messages,
do you store each message in a separate file, or lots of them
together in one file? What if you want a mail message in two
different folders, but you don't want to duplicate it? In Unix,
you can't do it. Inevitably, if you tried to use UNIX files for
storing data, you would end up storing everything in one file to
avoid breaking links, and not all of the links that will
eventuate can be planned in advance. And if you're going to store
everything in one file, then it has to be a real persistent
store. You can't be re-writing 100 Meg just because you changed
one object.

If a SchemeOS had something equivilent to a /etc/password it
wouldn't be just a lame structure of various strings. There would
be a collection of user objects. Each user object would have a
reference to some kind of root object for that user (like a home
directory) You could directly navigate from the user object to
their personal objects. Those objects might include say a
document whose author points back to the global user object.
Refererences criss-cross the universe allowing direct navigation
everywhere.

The whole deal with the persistent store  is about object
orientation. That is storing the code that manipulates data with
the data itself. If there was a /etc/password equivilent it would
be a collection with methods appropriate for managing users.

I must ask you... Why would you want to muck around with a
conventional UNIX file system at all given all its disadvantages?
Just for backward compatibility perhaps?

-- 
Chris Bitmead
http://www.ans.com.au/~chrisb
mailto:chrisb@ans.com.au