[ucw-devel] [ucw] rfc: how to handle transactions
christion queinnec (one very smart cookie) implements transactions with something along these lines: (let ((done-p nil)) (when done-p (call sorry-cant-do-this-more-than-once) (exit-from-let-body)) (call some-page) (setf done-p t)) basically the use of the lexical done-p ensures that the body of the let will only be executed once (due to the fact that done-p is a closed over variable which doesn't change values on subsequent returns from (call same-page)). i'd really love the implementation of transactions in ucw to be this simple, however unlike queinnec's model we can't be sure that the call to call will only show one page (in fact in his model CALL is actually SHOW-PAGE (or something similar)). anyway, what i'm wondering is this: if component FOO is in a transaction, and that transaction has already terminated, should we simply not allow FOO to return multiple times (as would happen with the above implementation) or should we do keep doing what ucw currently does and not allow any of the pages generated by FOO (or components called by FOO) to call actions? -- Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen
participants (1)
-
Marco Baringer