[Seaside] persistence for lazy people

Cees De Groot cdegroot at gmail.com
Sun Nov 27 00:25:53 CET 2005

On 11/27/05, Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
> Is this a bad idea, or does it qualify as the simplest thing that
> could possible work?

No, lots of people are using it. For a bit of added safety, I like to
spit out just the data now and then - if you can collect all the data
in a common root, that's easily done as an image segment.

E.g. for my Gardner package, I take a full snapshot every hour
(Smalltalk saveSession), create a new image version every week
(Smalltalk saveAsNewVersion) and spit out wiki data as an image
segment every day ('wikis' here has all the wikis e.g. is the root of
all data):

	"save all wiki as exported image segments. This enables image-image
	transport of wikis, and may also be used as an extra backup measure

		self saveWikisAsImageSegments
	wikis keysAndValuesDo: [:key :value |
		(ImageSegment new copyFromRootsForExport: (Array with: value))
			writeForExport: ((key reject: [:c | c = $/]), '-', TimeStamp
current asSeconds asString)]

More information about the Seaside mailing list