[Seaside] serialize continuations

Avi Bryant avi.bryant at gmail.com
Tue Apr 5 14:08:59 CEST 2005


On Apr 5, 2005 7:05 AM, Andrei N.Sobchuck <andrei.sobchuck at gmail.com> wrote:
> Can I serialize continuations to an external storage,
> and load later? Are there any (dialict-specific) issues?

Hi Andrei,

Well, yes, you can always save the image :).

In Squeak you can also use ImageSegments to swap out a single session
and all of its associated continuations etc.  This lets you in theory
have much longer expiration times for your sessions, since you don't
need to keep them entirely in RAM the whole time.  However, I've never
properly implemented this with hooks to close and restore database
sessions and so on.   Also, this is only really suitable for saving
and then loading back into the same image - as a sort of selective
virtual memory system - rather than saving it and loading it into a
*different* image, which you might want for failover etc.

But using image saving may not actually be that unreasonable -
particularly if we can get a pretty stripped down image file, it would
be conceivable to fork a new vm process per session, and keep a
separate full image around on disk for each one.  You'd need a
controller image using OSProcess to do all the forking, starting up of
new vms as needed, shutting down ones that haven't been used for a
while, routing the IO.  If you were saving the images to an NFS mount
or some such, you could get a pretty robust system with *very* long
lived sessions.  The main problem would be code updates - you'd need
to go through each of the images and load in the new versions...

Avi


More information about the Seaside mailing list