Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3279

Leverage improved observation support from Oak

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • JCR Resource 2.3.8
    • JCR
    • None

    Description

      OAK-1120 introduces better support for observation, which could be used by Sling. For example JcrResourceListener could be rewritten leveraging Oak's Observer. Since Oak observers already run on background threads further decoupling (like it is currently done) is not necessary. This makes it unnecessary to queue potentially a lot of events in Sling. Since neither Oak there does queue events (they are generated by need) this will probably greatly improve scalability in the face of many events.

      Furthermore OSGi filters could be passed down and translated to Oak such that filtering is done much closer to the source of the events.

      Finally instead of using a centralised event dispatcher (like JcrResourceListener currently is) it would be better to install a dedicated Observer for each OSGi event listener since dispatching is already handled by Oak and thread pooling (i.e. assigning threads for dispatching call backs to observers) can be controlled through Sling's thread pool support . This has the further advantage of making individual stats available for the listeners through JMX.

      Register an OakExecutor backed by e.g. a Sling thread pool and it will be picked up by Oak.

      Attachments

        1. SLING-3279-combined-7.patch
          59 kB
          Carsten Ziegeler
        2. SLING-3279-combined-6.patch
          61 kB
          Michael Dürig
        3. SLING-3279-combined-5.patch
          59 kB
          Carsten Ziegeler
        4. SLING-3279-combined-4.patch
          59 kB
          Carsten Ziegeler
        5. SLING-3279-combined-3.patch
          69 kB
          Michael Dürig
        6. SLING-3279-combined-2.patch
          67 kB
          Carsten Ziegeler
        7. SLING-3279-combined.patch
          33 kB
          Carsten Ziegeler
        8. SLING-3279.patch
          48 kB
          Michael Dürig

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              mduerig Michael Dürig
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: