Description
Currently, Observation listeners receive events that originated in any cluster nodes.
If even just one observation listener is registered without filter (listening for all events below the root node) at any cluster node, then the resulting system does not scale linearly with the number cluster nodes, because each event that originated in any cluster node will have to be sent to this observation listener.
One way to solve this "scalability blocker" is to register no observation listener at all, or only observation listeners for very specific subtrees (subtrees where only one cluster nodes writes into). However, that would require the content structure to mirror the cluster architecture, which is undesirable.
In many cases, observation listeners are only interested in cluster local changes. However, currently there is no way to register an observation to only listen for those events - instead, an observation listener needs to be registered for all changes by all cluster nodes, and the Jackrabbit needs to generate events for changes by all cluster nodes, and the application might use JackrabbitEvent.isExternal to disregard cluster external events. That means, events are created unnecessarily in a way that doesn't scale to many cluster nodes.
As a scalable alternative, I suggest to add a marker interface "LocalObservationListener", which will only receive events that originated in the current cluster node.
Attachments
Issue Links
- is related to
-
OAK-1133 Observation listener PLUS
- Closed