Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1121

Enhance observation mechanism to only listen to cluster local changes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.11
    • jcr
    • None

    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

          Activity

            People

              mduerig Michael Dürig
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: