Alaric B. Williams
Mon, 5 May 1997 22:13:03 +0000
> Now, building a new abstraction to deal with an OS which has no files,
> only persistent objects - that could be done from scratch.
Not necess. If we define a pathname thing that has a well-developed
concept of object type, then we can have persistent objects
with ease, I think.
Ok, imagine we have this path object which can be constructed somehow
(from a string, a list, or whatever), and that refers to an object in the
user-level persistent world.
We can tell this path object to give us the object, and we can let that object
be GCed. Such an object will have a special GCing flag that makes the GC
tell the storage manager to send it back to the path... let me give some examples:
Imagine our path is constructed with a UNIX pathname, say a text file. It
will use appropriate techniques to determine a type, in this case "string".
When we ask for the actual object, it creates an object of class
"string", and fills it in from the file.
When it is finalised, the path object is told to close it down.
It does this by storing the string back to the file.
Now, a pathname pointing to something like a time server will return
an object with methods to obtain the time.
Each type of pathname (URL, UNIXy file, etc), when it is created (by a
filer registering with the pathname system) is responsible for
determining types, and constructing objects from paths.
There is a class, "directory", which anything like a directory
must be descended from. A path object referencing a directory
or other group of paths, when told to retreive the object,
will return some subclass of directory.
Directories do things like return lists of the path objects
they contain - but their most important task is to accept
Any Lisp object can thus be "attached" to the persistent universe.
Many directories will deny this right; for example, the Internet
directory, which lists hosts, will deny this.
A UNIX directory would first of all check to see if the object is
of a type it knows - a string, for example, is stored as a text
file - and if not, save it as a ".lispos" file, as a binary image
of the object.
A native LispOS filer, of course, would accept any object anywhere,
and not have to go through hoops to recognise the types of objects
it's paths represent!
Alaric B. Williams (email@example.com)
---<## OpenDOS FAQ ##>---
Plain HTML: http://www.delorie.com/opendos/faq/
Fancy HTML: http://www.deltasoft.com/faq0000.html