cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: Continuation invalidation strategies
Date Sun, 02 Oct 2005 17:36:49 GMT
Reinhard Poetz wrote:
> wrote:
>> Author: reinhard
>> Date: Sun Oct  2 05:32:38 2005
>> New Revision: 293102
>> URL:
>> Log:
>> make ContinuationsManagerImpl extensible so that it is possible to 
>> implement your own continuations invalidation strategy
> Has anybody else experienced memory problems when using continuations? 
I have never had those (but the web applications I'm maintaining don't 
get much traffic). I was always a little bit scared of the approach I 
took: my customer required every paginated/filtered list or CRUD view to 
keep it's state and those could nest waaay deep.

> It's not a memory leak per se but a problem if there are too many active 
> continuation trees. All objects that are linked to a continuation tree 
> can only be garbage collected when the *last continuation* of a tree has 
> expired.
> If you implement a flow that uses some heavy-weight business objects and 
> you can't put them into global variables you soon run into problems if 
> this flow is executed many times by your users.
> So I started to experiment with different continuation invalidation 
> strategies than the the dfeault time-based one.
> I started with a first strategy that keeps only one active continuation 
> tree per user (thanks to Leszek and his work on the session-based 
> continuation holders this was very simple). Another strategy could be 
I'm happy somebody found it useful :)

> that there is only a certain number of active continuations allowed per 
> user. Or a third option that I could think of is that only one tree per 
> flow (function) is allowed per user.
> Do these different invalidation strategies make sense at all? If yes, 
> are others interested in seeing them in our code base? WDYT?
The best scenario in my case would be to keep not even a single 
continuation tree but a single continuation chain. Any new top level 
continuation or a fork in current one automatically invalidates the rest 
so all the time there is only one way back. I think for most desktop 
alike web applications continuation trees (or even a multiple ones) are 

Leszek Gawron                            
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                    
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

View raw message