Persistence: a proposal

Patrick Logan patrickl@servio.gemstone.com
Thu, 22 May 97 16:36 PDT


>>>>> "Kelly" == Kelly Murray <kem@Franz.COM> writes:

    Kelly> Can anyone please explain to me how continuations make
    Kelly> things simpler than traditional threads?  Or how they can
    Kelly> work in a shared persistent OODB?

Sure! Here is the thread scheduler...

(set! *timer-interrupt*
    (lambda ()
        (call-with-current-continuation
            (lambda (k)
                (replace-thread k)))))

(define (replace-thread thread)
    (add-last! thread-fifo thread)
    (remove-first! thread-fifo))

This is some stupid thing off the top of my head, but it's just about
that simple.

To see how easy it is to implement:

* Exception handling
* Fluid variables
* Backtracking

see Haynes and Friedman, "Embedding Continuations in Procedural
Objects", ACM TOPLAS, Oct. 1987

To see how easy it is to implement:

* Remote procedure call
* Load balancing
* Dynamic migration of computation

see the Kali Scheme system from NEC/NJ.

Since Kali Scheme can reify continuations and send them to other
hosts, there is no reason it could not also send them to a persistent
store and bring them back later for further execution.

    Kelly> C code has been forever banished from my SilkOS..

That's nice (really, no smiley). But if it does not support the level
of functionality of Utah's OS kit then there is room for parallel
development. And since OS kit + <some lisp> does not support the level
of functionality of Linux + <some lisp> there is room for even more
parallel development.

    Kelly> The Brooks real-time GC indirection strategy is
    Kelly> interesting, and similiar to how Smalltalk works and
    Kelly> manages to do interesting things.

I'll get a little defensive because although I prefer CL and Scheme to
Smalltalk, I make my living implementing Gemstone Smalltalk. There are
thousands of misunderstandings in the world about Lisp *and*
Smalltalk.

When you say "similar to how Smalltalk works" I think you mean
"Goldberg and Robson Smalltalk-80" because there are as many ways to
implement Smalltalk as there are to implement Lisp. Most of them are
far more contemporary than that reference.

-- 
Patrick Logan                 mailto:patrickl@gemstone.com
Voice 503-533-3365            Fax   503-629-8556
Gemstone Systems, Inc         http://www.gemstone.com