jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject Oak Observers
Date Fri, 22 Feb 2013 10:36:53 GMT
hi guys,

There's been a talk recently about using observation for some search
indexes that don't need synchronous updates.
I wanted to poke that a bit, to see how that could look like but I ran into
some issues with the observation implementation.

First of all, it is only used with the KernelNodeStore impl, the other 2
options (MemoryNodeStore & SegmentNodeStore) have no notion of it.
The interesting part is probably how you actually add an observer via the
NodeStore api, not having to cast to a specific impl.

Second: the KernelNodeStore has a #setObserver method. Does that imply that
there can be only one global observer?
I can have more than one index impl available, so how do I listen for
changes on each of those?

The previous question was about the number of observers that can be
installed, the next one is about the actual api:
I like the fact that there is overlap in the api between observers and
commithooks, this means that indexing code can be reused.
My issue is how do I install an observer on a given path?
I'm thinking about adding an observer at the same location as the index
definition.The benefit of this approach is to be able to switch from sync
(via commit hooks) to async (via observers) and still use the same update


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message