[Seaside] Re: Seaside and GOODS
Yar Hwee Boon
hboon at motionobj.com
Tue Apr 12 16:23:02 CEST 2005
On 17-Mar-05, at PM 10:59, Avi Bryant wrote:
> self session writeableVersionOf: someObject do:
> [:obj |
> ....]
>
> We could also hook this up to a dirty-marking policy so that
> WriteBarrier wasn't needed. A little extra work, but a lot of
> benefit. Neat.
>
> We'd probably also want some kind of expiring cache policy on the
> read-only version of the session, so you didn't end up with the whole
> DB in your image, but that should be pretty doable.
I've put up a version at
http://motionobj.com/squeak/GOODS-hboon.81.mcz. It doesn't do much
except providing a KKReadOnlyDatabase class that stubs out methods such
as #commit and #rollback with errors and not putting the objects behind
a writebarrier. The expiring cache policy is not implemented, so
there's a possibility that the image can become quite bloated.
Basically, I'll have WASession>>withEscapeContinuation: overridden as
withEscapeContinuation: aBlock
self commonDatabase refresh.
^ self database
commitWithRetry: [super withEscapeContinuation: aBlock]
I haven't actually used this :) Maybe someone using GOODS with a
moderate load can try it out.
--
HweeBoon
MotionObj
(65) 6764-9774
More information about the Seaside
mailing list