[comp.lang.clos] Persistent Objects

davidsm@athena.mit.edu (David S. Miller) (01/14/91)

Another question:
I believe there was some discussion in this group a little while back
concerning Persistent Objects in CLOS.  Well, I don't have any record of
that discussion, and I've reached a point where I find it necessary to
write some methods to save the state of CLOS objects (i.e. - class
metaobjects as well as instances) to a file, so they can be restored at
a later time...

Is there any general facility to do this in CLOS, and, if not, can
anyone give me a suggestion of the best way to do this?  I assume this
is a fairly common problem that has been dealt with many times before...

Once again, Thanks for any and all assistance!
Dave.

---------------------------------
David S. Miller                 |INTERNET:      dsm@ctt.bellcore.com
Bellcore - RRC 1H206            |UUCP:          ..!bellcore!ctt!dsm
444 Hoes Lane                   |PHONE:         (201) 699-4533
Piscataway, NJ 08854-4182       |

brucec@phoebus.labs.tek.com (Bruce Cohen;;50-662;LP=A;) (01/15/91)

Andreas Paepcke at Hewlett-Packard (paepcke@hplabs.hp.com) has written a
persistent object system called PCLOS.  It's described in his papers

    "PCLOS: A Critical Review" in the OOPSLA '89 Proceedings

    "PCLOS: Stress Testing CLOS - Experiencing the Metaobject Protocol" in
        OOPSLA '90

Read these papers for a very good analysis of the problem and his
solutions.

--
------------------------------------------------------------------------
Speaker-to-managers, aka
Bruce Cohen, Computer Research Lab        email: brucec@tekchips.labs.tek.com
Tektronix Laboratories, Tektronix, Inc.                phone: (503)627-5241
M/S 50-662, P.O. Box 500, Beaverton, OR  97077

jonl@LUCID.COM (Jon L White) (01/15/91)

re: Persistent Objects in CLOS . . .
    . . . and I've reached a point where I find it necessary to
    write some methods to save the state of CLOS objects (i.e. - class
    metaobjects as well as instances) to a file, so they can be restored at
    a later time...

This is probably not the same issue as "persistence" in general --
for that you might want to look at the last two OOPSLA proceedings
at papers by Andraes Paepcke of HP Labs on PCLOS.

Your immediate need sounds like a "fasdmping" facility would suffice
("fasdmp" is Lisp Machine terminology).  CLtL/II page 659 presents a
function MAKE-LOAD-FORM invented for just this purpose.

I don't suppose that any commercial CLOS in the field right now
actually has that implemented, since it was added rather late in the
X3J13 game.  Lucid's 4.1 image has it working now, but I'm unable to
make any guesses as to when this might be publicly available.

As a temporary "stop-gap", I prepared for my own use a kludge that
somewhat simulates in 4.0 and earlier releases the LOAD-TIME-VALUE
facililty of CLtL/II page 680; at least one person was able to
write some "reconstructor" functons for PCL and CLOS objects using
this kludge.  It's not a product or supported item, but if you are
using Lucid and really stuck, give me a call privately.  If you
are using Franz, I would suspect that one of the Franzoids should
be able to prepare a similar kludge for their system too.


-- JonL --

P.S.  I see your email return address is different in the two msgs;
      are you really a bellcore person, or an MIT "athena" student?

peter@starfleet.bt.co.uk ("Peter T. Magee") (01/15/91)

JonL writes,
     Your immediate need sounds like a "fasdmping" facility would suffice
     ("fasdmp" is Lisp Machine terminology).  CLtL/II page 659 presents a
     function MAKE-LOAD-FORM invented for just this purpose.

     I don't suppose that any commercial CLOS in the field right now
     actually has that implemented, since it was added rather late in the
     X3J13 game.

Harlequin Lispworks has an implementation of MAKE-LOAD-FORM which works.

Pete