On 7/6/2010 10:37 AM, Eric Dalquist wrote:
Why does it need to be an EventHandler? How about a simple bean that is
called via the scheduler periodically? It along with the assocated
trigger could still be declared and configured in the statsContext.xml
but it seems strange to overload EventHandler for a purpose that isn't
actually handling any events.
It doesn't really have to be an EventHandler. That idea just suggested
itself because: (1) i thought the config should go in statsContext.xml;
(2) by design, EventHandlers receive an active thread periodically
(all else being equal, this bit saves me having to sort out the details
of the scheduler or another periodic job system); (3) i was thinking of
using nested EventHandlers (just like PortalEventMulticaster) for the
optional responsibility of re-playing the event at some subsequent form
of storage.
But I can do 1 & 3 with "the scheduler" too.
Also anecdotally we've found that doing small purges more often is much
easier on the stats database than once per day. Perhaps have this thing
purge events older than X days and have run once per hour?
I was imagining that both the period of sweep and the expiration timeout
would be configurable... probably in minutes. So the same code would
allow you to do large purges seldom and small purges frequently.
I'll defer to your findings when I set up the suggested/documented config.
drew
-Eric
On 07/06/2010 12:28 PM, Drew Wills wrote:
Hey folks,
Is there general interest in a concrete EventHandler class that does
something like the following:
- ignores all events, except 1 event every xyz period (probably a day)
- on that event, runs a DB update to scrub events older than abc
(maybe a month)
- optionally (re)writes those events to some other form of storage,
like a file or perhaps a separate, archival DB?
I'm thinking of this service as an EventHandler impl so it can be
configured and managed part-and-parcel with everything else in
statsContext.xml.
drew wills
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-dev