You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sebastien Koechlin <sk...@ivision.fr> on 2001/12/06 16:58:03 UTC

[PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Sylvain Wallez wrote:
> 
> Sebastien Koechlin a écrit :
> >
> > Here is a patch against cocoon_20_branch, I don't know if you can apply
> > it on HEAD (I did not test).
> >
> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> > working, but eat huge quantity of memory, and displayed data are raw.
> > This is not for final administrators yet.
> 
> Applied to 2.1, thanks.
> I modified it a bit to output SAX events directly instead of building
> large lists.

Ok, I was not really proud of thoses lists.


> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
> the same keys in them ?

First :

There is something wrong in my code, I have in logs:
DEBUG ... DefaultComponentFactory: ComponentFactory creating new
instance of org.apache.cocoon.generation.StatusGenerator.
DEBUG ... DefaultComponentFactory: no logger attribute available, using
standard logger
WARN  ... ExcaliburComponentManager: Looking up component on an
uninitialized ComponentManager:
org.apache.cocoon.components.store.StoreJanitor

So I probably do not have the main StoreJanitor.

I'm going to write a static (synchronized) StoreJanitor to 
record any in-memory Store created.
Is it a good solution, or is there something better ?


Second:

Everybody want to know what is inside, isn't it?
Here is another patch to display classname of cached object...

And surprise, there is nothing in our Stores!
When I request an Object by his key, I have nothing most of the
time!

Why does we store null values in MRUMemoryStores ?


Here is the StatusGenerator patch against HEAD.
And an HTML page with StatusGenerator result using
this patch.

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi Sebastien,
First, check-out a new HEAD version and you will see
your StatusPage working proper. Just klick
on "C2 Docs" to get some items in the cache.

Second, how about a distinction between cache items
in memory and those on the filesystem.
(Hint: filesystem items are starting with cache-dir\....)

Cheers
Gerhard

"Whose cruel idea was it for the word "lisp" to have an "s" in it?"

>Gerhard Froehlich wrote:
>>
>> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>[OT: your mailer is broken, it use wrong field]
>
>> >So I probably do not have the main StoreJanitor.
>>
>> There is only one impl, yet ;-).
>> On my machine the StoreJanitorImpl initialize proper.
>>
>> >I'm going to write a static (synchronized) StoreJanitor to
>> >record any in-memory Store created.
>> >Is it a good solution, or is there something better ?
>>
>> Why, the actual StoreJanitorImpl does this already. But maybe
>> I understood your question wrong.
>
>There is only one implementation, but I thought I got a new instance
>of it. I tested and it's ok, there is one and only one instance.
>
>
>> >Second:
>> >
>> >Everybody want to know what is inside, isn't it?
>> >Here is another patch to display classname of cached object...
>> >
>> >And surprise, there is nothing in our Stores!
>> >When I request an Object by his key, I have nothing most of the
>> >time!
>>
>> Yes because default we're using the NonCachingxxxPiplines (I don't
>> know the reason, really!).
>> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
>> to CachingStreamPipeline and CachingEventPipeline. Then it should
>> work proper.
>>
>> >Why does we store null values in MRUMemoryStores ?
>>
>> Don't know.
>
>With all thoses null values, finding a key is probably slower.
>
>
>--
>Sébastien Koechlin - IVision - skoechlin@ivision.fr
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>For additional commands, email: cocoon-dev-help@xml.apache.org
>
>



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


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
Sebastien,
>Gerhard Froehlich wrote:
>> 
>> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>[OT: your mailer is broken, it use wrong field]
>
>> >So I probably do not have the main StoreJanitor.
>> 
>> There is only one impl, yet ;-).
>> On my machine the StoreJanitorImpl initialize proper.
>>
>> >I'm going to write a static (synchronized) StoreJanitor to
>> >record any in-memory Store created.
>> >Is it a good solution, or is there something better ?
>> 
>> Why, the actual StoreJanitorImpl does this already. But maybe
>> I understood your question wrong.
>
>There is only one implementation, but I thought I got a new instance
>of it. I tested and it's ok, there is one and only one instance.

Yes because the StoreJanitorImpl implements the ThreadSafe interface. 
"A Component that implements this interface will generally only have 
one instance available in the system, and other Components will use
that one instance." (Avalon Developer Guide)

>
>> >Second:
>> >
>> >Everybody want to know what is inside, isn't it?
>> >Here is another patch to display classname of cached object...
>> >
>> >And surprise, there is nothing in our Stores!
>> >When I request an Object by his key, I have nothing most of the
>> >time!
>> 
>> Yes because default we're using the NonCachingxxxPiplines (I don't
>> know the reason, really!).
>> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
>> to CachingStreamPipeline and CachingEventPipeline. Then it should
>> work proper.
>>
>> >Why does we store null values in MRUMemoryStores ?
>> 
>> Don't know.
>
>With all thoses null values, finding a key is probably slower.

Sorry through some other business I'm little bit off topic with
the caching and storing issues in Cocoon. But I will take a look,
soon!

Cheers
Gerhard

"Sex... the pleasure is momentry, the position ridiculous,
and the expense damnable.
(Lord Chesterfield)"



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


Re: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Sebastien Koechlin <sk...@ivision.fr>.
Gerhard Froehlich wrote:
> 
> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On

[OT: your mailer is broken, it use wrong field]

> >So I probably do not have the main StoreJanitor.
> 
> There is only one impl, yet ;-).
> On my machine the StoreJanitorImpl initialize proper.
>
> >I'm going to write a static (synchronized) StoreJanitor to
> >record any in-memory Store created.
> >Is it a good solution, or is there something better ?
> 
> Why, the actual StoreJanitorImpl does this already. But maybe
> I understood your question wrong.

There is only one implementation, but I thought I got a new instance
of it. I tested and it's ok, there is one and only one instance.


> >Second:
> >
> >Everybody want to know what is inside, isn't it?
> >Here is another patch to display classname of cached object...
> >
> >And surprise, there is nothing in our Stores!
> >When I request an Object by his key, I have nothing most of the
> >time!
> 
> Yes because default we're using the NonCachingxxxPiplines (I don't
> know the reason, really!).
> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
> to CachingStreamPipeline and CachingEventPipeline. Then it should
> work proper.
>
> >Why does we store null values in MRUMemoryStores ?
> 
> Don't know.

With all thoses null values, finding a key is probably slower.


-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

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


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by giacomo <gi...@apache.org>.
On Thu, 6 Dec 2001, Gerhard Froehlich wrote:

> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
> >
> >
> >Sylvain Wallez wrote:
> >>
> >> Sebastien Koechlin a écrit :
> >> >
> >> > Here is a patch against cocoon_20_branch, I don't know if you can apply
> >> > it on HEAD (I did not test).
> >> >
> >> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> >> > working, but eat huge quantity of memory, and displayed data are raw.
> >> > This is not for final administrators yet.
> >>
> >> Applied to 2.1, thanks.
> >> I modified it a bit to output SAX events directly instead of building
> >> large lists.
> >
> >Ok, I was not really proud of thoses lists.
> >
> >
> >> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
> >> the same keys in them ?
> >
> >First :
> >
> >There is something wrong in my code, I have in logs:
> >DEBUG ... DefaultComponentFactory: ComponentFactory creating new
> >instance of org.apache.cocoon.generation.StatusGenerator.
> >DEBUG ... DefaultComponentFactory: no logger attribute available, using
> >standard logger
> >WARN  ... ExcaliburComponentManager: Looking up component on an
> >uninitialized ComponentManager:
> >org.apache.cocoon.components.store.StoreJanitor
> >
> >So I probably do not have the main StoreJanitor.
>
> There is only one impl, yet ;-).
> On my machine the StoreJanitorImpl initialize proper.
>
> >I'm going to write a static (synchronized) StoreJanitor to
> >record any in-memory Store created.
> >Is it a good solution, or is there something better ?
>
> Why, the actual StoreJanitorImpl does this already. But maybe
> I understood your question wrong.
>
> >
> >Second:
> >
> >Everybody want to know what is inside, isn't it?
> >Here is another patch to display classname of cached object...
> >
> >And surprise, there is nothing in our Stores!
> >When I request an Object by his key, I have nothing most of the
> >time!
>
> Yes because default we're using the NonCachingxxxPiplines (I don't
> know the reason, really!).

It seems that the CM is not using the class mentioned in the
cocoon.xconf. Insted it sticks this the default-class in the
sitemap.roles file.

Why is this??

Does anybody know why the default-class is preferred over the class in
the config? Shouldn't it be the other way around?

> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
> to CachingStreamPipeline and CachingEventPipeline. Then it should
> work proper.

In my oppinion we should have to do that. The 2.0 branch does
correctly select the expected classes. Is it the newer avalon jar?

Giacomo


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


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
>From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>
>Sylvain Wallez wrote:
>>
>> Sebastien Koechlin a écrit :
>> >
>> > Here is a patch against cocoon_20_branch, I don't know if you can apply
>> > it on HEAD (I did not test).
>> >
>> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
>> > working, but eat huge quantity of memory, and displayed data are raw.
>> > This is not for final administrators yet.
>>
>> Applied to 2.1, thanks.
>> I modified it a bit to output SAX events directly instead of building
>> large lists.
>
>Ok, I was not really proud of thoses lists.
>
>
>> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
>> the same keys in them ?
>
>First :
>
>There is something wrong in my code, I have in logs:
>DEBUG ... DefaultComponentFactory: ComponentFactory creating new
>instance of org.apache.cocoon.generation.StatusGenerator.
>DEBUG ... DefaultComponentFactory: no logger attribute available, using
>standard logger
>WARN  ... ExcaliburComponentManager: Looking up component on an
>uninitialized ComponentManager:
>org.apache.cocoon.components.store.StoreJanitor
>
>So I probably do not have the main StoreJanitor.

There is only one impl, yet ;-).
On my machine the StoreJanitorImpl initialize proper.

>I'm going to write a static (synchronized) StoreJanitor to
>record any in-memory Store created.
>Is it a good solution, or is there something better ?

Why, the actual StoreJanitorImpl does this already. But maybe
I understood your question wrong.

>
>Second:
>
>Everybody want to know what is inside, isn't it?
>Here is another patch to display classname of cached object...
>
>And surprise, there is nothing in our Stores!
>When I request an Object by his key, I have nothing most of the
>time!

Yes because default we're using the NonCachingxxxPiplines (I don't
know the reason, really!).
Change in the cocoon.roles the roles for StreamPipline and EventPipeline
to CachingStreamPipeline and CachingEventPipeline. Then it should
work proper.

>Why does we store null values in MRUMemoryStores ?

Don't know.

>
>Here is the StatusGenerator patch against HEAD.
>And an HTML page with StatusGenerator result using
>this patch.
>

-----------------------------------------------------
That must be wonderful! I don't understand it at all.
-----------------------------------------------------



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