POS

Alaric B. Williams alaric@abwillms.demon.co.uk
Sun, 11 May 1997 12:02:27 +0000


> I think you have a very good point here - basically, if programs are
> saving all sorts of data just by relying on object persistence, then
> how does one go about cleaning his workspace?

Well, under my plan for persistent first-class virtual machines, we'd
have a setup like this:

 - The raytracer is an "application" (persistent VM) called 
"/Programs/Raytracer" or whatever.

 - It creates a persistent graphics object called "/Work/Picture"

 - A web browser lives in an "application" called "/Programs/WWW",
and maintains a cache using weak references.

The raytracer has created the graphics object, and periodically
(after each line is processed?) calls (commit! output-image),
which (optionally synchronously?) stores the object pointed to,
including component objects if it's a compound object, of course.

To keep track of it's internal state, it calls (self-commit!)
from time to time, making sure it's execution state and anything
reachable from it's top level definitions, stack, or whatever
is stored.

Strolling around with my persistent store browser, I see the
sizes (in bytes) of /Work/Picture, and decide to keep it.
However, my web browser is getting a bit big, so I right-click
on it and choose "Shave", which drops all the weak links in it
and runs a GC. If space got short, the filer would start doing that
anyway.

Note: application VMs communicate through the persistent store by
registering external interfaces, used like so:

(let*
   ((web-browser-path (make-path 'Programs 'WWW))
   (web-browser (open web-browser-path)))
      (invoke web-browser '(open (Programs WWW)))
   )

The "invoke" thing could occur accross network boundaries transparently.
The opening of the web-browser-path to return the web-browser application
itself would take some parameters for security verification etc too.

> Maybe just say (defvar-persistent 'foo) instead of (defvar 'foo), and
> then let checkpointing save everything that's pointed to?  But if you
> don't save and restore everything, then I'd think you'd run into all
> sorts of pointer adjustment problems.  But, maybe it's not so bad if
> one's saving everything pointed to by a set of top level objects.

Yes, that's the kind of thing I'm aiming for. Data internal to yourself
is just kept as a normal variable, and it gets stored with the application's
VM.
 
ABW
--
Alaric B. Williams (alaric@abwillms.demon.co.uk)

   ---<## OpenDOS FAQ ##>---

Plain HTML: http://www.delorie.com/opendos/faq/
            http://www.deltasoft.com/faq.html

Fancy HTML: http://www.deltasoft.com/faq0000.html