cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2] Caching, target JDK and forgetful developers..
Date Thu, 14 Sep 2000 20:41:22 GMT
Paul Russell wrote:
> Hi all,
> There've been a number of people talking on the list in recent
> weeks about C2s caching (or rather lack of caching). This evening,
> I had one of those bursts of enthusiasm and thought I'd look at
> implementing it. Before I do, though, I just wanted to give
> people a heads up, check nobody else is already doing it, and
> ask a couple of questions.
> Firstly, I've forgotten which JDK we're targetting at now, am
> I safe to use SoftReference etc? (i.e are we jdk1.2 happy?)

We are targetting 1.2. I don't know if we need SoftReferences (see
comments below)

> Secondly, what kind of architecture do we want to use for
> caching in cocoon2? There is already a 'Store' interface in
>, which looks like it fills
> the requirements of a cache. Was this interface origionally
> conceived for this purpose? Are there any reasons not to use
> it?
> Thoughts, and comments?

The forthcoming Avalon release has many things introduced that we should
use for our cache/store/pools implementations. They have made marker
interfaces like ThreadSafe, Recyclable and Poolable and corresponding
classes to build pools out of such marked classes. The revised
ComponentManger interface (implemented into today) will help
us to get that working the right way. Today it will create a new
instance of every component it is ask for (and that's why the store
component isn't usable today because the ComponentManager has no way to
check if it should create an instance of a component or not). The
pooling stuff would fit best for the sitemap components because many of
them (yes, almost all) are not thread safe and have to be instantiated
for every request. Pulling them out of an object pool would reduce
garbage collection. If you would volunteer for that job I would
encourage you to grab them from the Avalon CVS and look for those
Interfaces and classes and how they could be incorporated into C2 (and I
have some spare time to go back to the halfway finished sitemap
documentation :<). I think the Avalon guys will release it very soon so
I do not expect any changes to those classes I've mentioned so far
(maybe except the ComponentManager).

So, what's your comment now, Paul?


PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen          

View raw message