cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <>
Subject RE: cvs commit:
Date Mon, 28 Jan 2002 20:48:04 GMT

>From: Vadim Gritsenko []
>> From: Gerhard Froehlich []
>> Hi,
>> >-----Original Message-----
>> >From: Britton, Colin []
>> >Sent: Monday, January 28, 2002 5:59 PM
>> >To:
>> >Subject: RE: cvs commit:
>> >
>> >
>> >For our application I want to not only cache from memory, but also
>> >the objects on the fileSystem (as the cost of generation in our app
>> >be high). With the change so that items are only written to the file
>> >system when the number of memory objects reaches max and
>> >called it seems that we loose this capability unless we set the
>> >objects to a small number (which defeats the objective of the cache
>> >having lots of memory). One of the benefits of the old way was that
>> >the VM unexpectedly quits we had the file system cache for all the
>> >that were in memory. Also all memory objects are lost after shutdown,
>> >maybe it would also be also a good idea to write the memory objects
>> >disk on a formal shutdown (this was not needed with the old method)
>> >the queue method is not returned.
>> You can't imagine how much thoughts I wasted for that issue. I will
>> explain you them (again):
>> a) The old way stored every object twice. First in Memory, Second on
>> Filesystem. That was a very _expensive_ operation. We needed an extra
>> thread which did all that serialization and he eated performance.
>> The only real advantage was to have the objects persistent after a JVM
>> restart. Therefor I never had a good feeling about that. This are too
>> little advantages.
>> And besides, how often crashes the JVM. Every day, weekly, monthly.
>How long
>> does it take till the old caching status is reached? The first user
>> a slow page. The next a quick one.
>> I wanna have a clean implementation. This other issues are parts of
>> adaptive
>> caching or something else I say. It must be simple!
>> b) The new way behaves more like a normal OS cache. First everything
>> handeld
>> in memory. If this is running, old ones are swapped out to make room
>> others.
>New store implementation - does it swaps to file system when removing
>items from the stores?

Yep it does. When the free() method is called, the oldest object is swapped
to Filsystem. That's the main difference here.

>> At least I see no way how to handle a formal shutdown. Did would be
>> best. Then we could catch this event and save the memory store down to
>> the Filesystem.
>No problems with this. Implement Disposable interface. 

Does it catch "ctlr-c" or "kill" under Unix, when I shutdown for i.e. Tomcat
Beer is God's way of showing us he loves us 
and wants us to be happy...

To unsubscribe, e-mail:
For additional commands, email:

View raw message