port of prevayler

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Mon Feb 17 14:52:47 UTC 2003


Hannes Hirzel <hannes.hirzel.squeaklist at bluewin.ch> wrote:
> goran.hultgren at bluefish.se wrote:
> 
> > > Or as a sequence of Squeak do-its.
> > 
> > Yes, much better. :-) We have one good language (Smalltalk) why not use
> > it? All this focus on XML (in the IT industry over all that is) is
> > really tiresome.
> > 
> > Btw, SqueakMap uses a very similar approach as Prevayler - in fact more
> > or less the exact same approach. ;-)
> 
> This is interesting. Marco, could you look into the implementation of
> SqueakMap
> and write some short documentation of how the prevayler ideas are
> implemented
> there and post the write-up to the list?

Well, a very short description goes like this:

The methods in the SqueakMap instance that actually change anything also
log that change as a do-it on a log file. If the server would go down I
can just fire it up and reload from the log. So this makes the servers
robust against failures. It also makes the client map easily recovered
and also (not exactly used yet) shareable between different images.

The other nice thing is that the server can very easily, given a last
known transaction number, copy the stuff in the logfile from that number
and forward, gzip it and return it to the client. The client then simply
loads that stuff as if it was from the logfile. So this is the basis for
the efficient update-mechanism.

Finally, you can always start a new logfile - SqueakMap will then file
itself out as a "snapshot" first and then start logging transactions on
top. Of course I don't do this on the server because it needs to be able
to server incremental updates for clients that haven't connected for a
long time.

Note that SqueakMap does all this "manually", but the principle is the
same.

regards, Göran



More information about the Squeak-dev mailing list