cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject [C2]: Status report on caching - update
Date Wed, 11 Apr 2001 10:55:26 GMT
Hi Cocooners,

let's do a "Calling all stations"...

...as the first caching implementation is just finished! 
Try it out and simply have fun.

For the caching to work you have to set up the CachingEventPipeline
in the cocoon.xconf as the EventPipeline.

The first tests for the welcome, the html, voxml and pdf pages
where delivered from the cache between 4-6 times faster than fresh
generated.

Concept
-------
The concept of the caching is based on the various discussions and
my own thoughts...So here only a short overview:

The sitemap components (currently Generator and Transformer) can
implement the Cacheable interface. This interface has two method:
- generateKey() to generate a unique key within the space of the
  component ,e.g for the FileGenerator this key is a hash of the
  source argument.
  (For this I added the HashUtil class which provides the BuzHash
   algorithm).
- generateValidity() the validity which checks if the cached content
  is still valid, e.g. for the FileGenerator this is the TimeStamp
  of the xml file.

The Caching Algorithm now checks all pipeline components for 
the Cacheable interface and builds a unique key from these Components
(starting from the generator just to the point before the first not
Cacheable component).
This key is used to get a CachedObject from the EventCache (actually
a Store). The CachedObject (if available) contains the cached content
and all validity objects when this was cached.
The next stage compares the current validity objects with the cached
ones. If they are all valid the cached response is used.
If something failes during this algorithm, a new response is generated
and this result is cached.

The storing of the sax events is implemented by two more Avalon components
the XMLSerializer and the XMLDeserializer. I just used Stefano's XMLCompiler
and modified it a little bit.

"That's all".


What is left to do (regarding caching)?
---------------------------------------
- Further cleanup of the code (I will do that in the next days)
- Make more components Cacheable
- Proove if this concept is sufficient.
- Check if we still need the cache efficiency algorithm
- Integrate ContentAggregation 
  Please explain what me what you need for caching ContentAggregation. I
  totally ignored this part for the first implementation. I don't use any
  SAXConnectors stuff - as I do not understand the sense of them right now.
  But I am sure that together, we can solve this.

We should solve this all in the next week.

Wish you all a happy easter!

Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================


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


Mime
View raw message