Berin Loritsch a écrit :
>
> Sylvain Wallez wrote:
>
> >
> > Gerhard Froehlich a écrit :
> >
> >>Hi,
> >>I started to implement the Resource Monitor into
> >>the caching process.
> >>
> >>One place are the Generators (FileGenerator, etc..), therefore
> >>I have to lookup up the Monitor component.
> >>Where shall I place the contextualize method in the Generator
> >>derivation tree:
> >>
> >>ComposerGenerator
> >> AbstractGenerator
> >> AbstractXMLProducer
> >>
> >>?
> >>
> >>I ask, 'cause I don't want to rain in somebodies "Generator" party ;)
> >>
> >>Cheers
> >>Gerhard
> >>
> >>
> > Gerhard,
> >
> > I'm happy you start working on Monitors : reducing filesystem lookup is
> > a must-do to increase performance. But I have a few wonders about the
> > way to introduce them in the engine.
> >
> > I didn't went deep in Monitors, but is it good to use an active monitor
> > ? From what I understand, an active monitor scans periodically (10 secs
> > in cocoon.xconf) all its resources.
>
> The period is configurable! This is a very important concept. In a
> development environment, it would probably be set as little as every
> minute or 5 minutes. In a production environment, it would most likely
> be set to 30 minutes or possibly 8 hours.
Sure it is configurable : I considered 10 secs only because it's the
current value in cocoon.xconf.
> > This means that every 10 secs, Cocoon will scan *each and every* file
> > monitored since the engine startup, even those that are unfrequently
> > used. I'm afraid this will be worse than what we have today on large
> > sites... but tell me if I'm wrong !
>
> Your wrong! It will only search the ones that are currently registered,
> AND the time is configurable. For the unit test, it is set to 10 secs
> or lower so the unit test doesn't take for ever.
I didn't meant something else ;) But once a resource is registered, it
will be check at each period, even if not used within that period. See
my answer to Gerhard for a more detailed discussion on this.
> > It seems to me that the main benefit of ActiveMonitor is for resources
> > that are systematically checked at each and every request : IMO, this
> > should be limited to configuration files and sitemaps.
>
> AND XSPs
Mmmh... some XSPs may be infrequently used, while this isn't the case of
xconf and toplevel sitemap files.
> > For less-frequently used resources, wouldn't it be a better solution to
> > only call getLastModified() when the resource is actually used and the
> > time since the last call to getLastModified() is greater than the
> > refresh period ? This would be a kind of buffering in front of the
> > filesystem. Also, can't this be integrated directly in Source ?
>
> I would like to see Resource and Source merged. Or at the _very_ least,
> Source extending Resource.
Great.
Sylvain.
> > Last point : your changes in ProgramGenerator make the assumption that
> > sources are files. This won't be true in unexpanded war files and will
> > very likely break the engine ;)
> >
> > What do you (and others) think ?
>
> There is room for more Resource types.
>
> They just have not been written yet.
>
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]