[Q] Question on Magma (or other Persistence Engine for Squeak/Seaside)

Göran Krampe goran at krampe.se
Thu Apr 19 07:51:15 UTC 2007


Hi!

Just wanted to mention that we created a new BatchedList implementation in
Gjallar specifically for Gjallar needs including Magma. It holds "pages"
cached with objects and its #batch looks like:

batch
	"Return the current batch (or page) for viewing.
	We cache the pages."

	[pages size < currentPage] whileTrue: [
		pages add: self fetchNextPage].
	^pages at: currentPage

...BUT it is not currently suitable for "general use", you would need to
adapt it a bit since it has some special code in it. For example, it is
built based on the assumption that we don't know how many objects we can
show for the user - whenever we fetch the "next page" we need to check
every object for permissions etc and decide if we want to show it.

Also - in Gjallar we have a "cache service" which holds onto objects for a
certain time (run regularly by our scheduler to purge out objects). This
is to "improve" caching behavior - otherwise the objects would not be held
onto by anyone and thus would be refetched from Magma each and every time.

This is also probably why you don't get any caching behavior from using
plain WABatchedList because it doesn't hold onto the objects - it only
holds the current page of objects. And thus it might be worthwhile to take
our Q2BatchedList and adapt it a bit to get the "cached pages" model
instead.

regards, Göran



More information about the Magma mailing list