avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Howard" <coc...@leverageweb.com>
Subject source resolver - validity
Date Sun, 15 Jun 2003 19:48:46 GMT
I assume this is the right list to discuss excalibur sourceresolve package?

I am working on a process for external cache invalidation for use
in Cocoon.  To get right to the point, what would the opinion be of
exposing something like SourceValdity[] getValidities() on
AbstractAggregatedValidity?  The purpose would be not to alter the
validities, but to examine them.

If validities are externally invalidated, how do you accomplish this?
In the Cocoon cache (which uses Excalibur store) a Pipeline result and
key are placed in the store.  The result holds a SourceValidity array
and exposes getValidities() so that they can be tested upon retrieval
from the cache before use.  However, with external validities (specific
use case is event based notification from EJB or database - maybe I should
call this "event" validity) the retrieved validity can't determine if it
is valid without contacting some external entity.  So, imagine I have a
JMS listener receiving event notifications about updates to a database, or
EJB's - some event processor would have to hold on to some events
perhaps indefinitely because as long as validities are left unawakened
(in persistent store, and never retrieved, or removed from store for space,
etc) it needs to remember for them.  I don't think an expiration scheme is
a good solution.

What I'd like to do instead is have each validity register it's dependencies
and the key under which it is stored with the event processor upon going
into
the cache.  When an event is received, the processor would look up those
keys
and remove the items from the cache (it could just mark them invalid, but
why
bother to keep them around at all?)  When the validity is created, it
doesn't
know what key it is being stored under, and probably shouldn't care.  So, I
think the place to handle this registration is when the item goes into the
cache.
In cocoon, there is a wrapper around the store implementation that would be
a
good place to handle this - I can check for these special validities and
handle
them when I have the key right there, and can unregister when the item is
removed,
etc.  The hitch I've run into is with aggregated validities which is where
the
proposal above comes from.

Very open to other suggestions and input and sorry for the long post,
Geoff Howard

(I would CC this to cocoon-dev but am joined on different addresses)


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


Mime
View raw message