cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Melhem <micha...@fztig938.bank.dresdner.net>
Subject Expire Continuations
Date Thu, 28 Nov 2002 18:28:56 GMT
Hi Ovidiu!!

How are you mate, I guess you are not coming to the Frankfurt
Stammtisch???? :-P

I was thinking about how to Expire Continuations and have come up with
the following:

We know from the "bus discussion" that placing every wk (WebContinuation)
into the "expirations" Sorted TreeSet is a problematic solution. So how
about placing only the "leaf" nodes in this set for each tree?

This can be done by:
    for each new wk
    	(if wk.getparent().numChildren() < 2)
		expirations.remove(wk.getparent());
	expirations.add(wk);

This could be an expensive operation especially if the set of wk's is
very large .... although.. the treeSet guarantees log(n) time cost for
basic operations. What do you think ?

Given that we have a sorted set of "leaf" nodes (from all continuation
trees) we need to excute the following algorithm to rid the
system of expired wk's

	For each leaf node in the set which is expired:
		delete it, and
		recursively delete its parent
		only if its parent has also expired
		*and* has no (other) children.

We could make the ContinuationsManager an avlaon monitored Resource,
so that we can periodically trigger continuations clean ups.

	This implies the max life of an "wk" after lastAcceesTime
	equals timeToLive + cleanUp_period.


What do you think??

Best Regards,
Michael Melhem



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message