You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Stefan Egli <st...@apache.org> on 2016/09/16 09:18:27 UTC
[observation] 1:n or 1:1 BasicObservationReporter ?
Hi,
Trying to understand implications of switching from OSGi EventHandler to
ResourceChangeListener I'd like to find out how the hook into Oak is
achieved. IIUC then currently all (!) ResourceChangeListeners are combined
into 1 (Basic)ObservationReporter, which gets invoked by a ('singleton')
OakResourceListener at [0] so that it can forward the changes to its
listeners in [1].
As a result after replacing the Sling event bridge with this new mechanism,
there will still be exactly 1 OakResourceListener which facades all
ResourceChangeListeners. And that 1 will imv become the new bottleneck.
I fail to see how this will improve the filtering that we're trying to
achieve in Oak - or is there a 1:1 mapping with the above mechanism still
planned?
Cheers,
Stefan
--
[0] -
https://github.com/apache/sling/blob/d36455f90b938c1d0966362682d7d3e14af2dcd
c/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/
OakResourceListener.java#L179
[1] -
https://github.com/apache/sling/blob/e3d97eeab99af7ba18178a3201e037fc7e8da09
b/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/i
mpl/observation/BasicObservationReporter.java#L127
Re: [observation] 1:n or 1:1 BasicObservationReporter ?
Posted by Stefan Egli <st...@apache.org>.
On 16/09/16 11:58, "Carsten Ziegeler" <cz...@apache.org> wrote:
>>or is there a 1:1 mapping with the above mechanism still
>> planned?
>>
>The 1:1 mapping (or even an optimization as there might be some overlap
>between several listeners) was and is the goal of this approach.
>If that isn't implemented in this way atm, I think this is a big
>oversight and needs to be fixed asap.
Created SLING-6056 for someone to grab (unless my assumption/finding was
wrong).
Cheers,
Stefan
Re: [observation] 1:n or 1:1 BasicObservationReporter ?
Posted by Carsten Ziegeler <cz...@apache.org>.
> Hi,
>
> Trying to understand implications of switching from OSGi EventHandler to
> ResourceChangeListener I'd like to find out how the hook into Oak is
> achieved. IIUC then currently all (!) ResourceChangeListeners are combined
> into 1 (Basic)ObservationReporter, which gets invoked by a ('singleton')
> OakResourceListener at [0] so that it can forward the changes to its
> listeners in [1].
>
> As a result after replacing the Sling event bridge with this new mechanism,
> there will still be exactly 1 OakResourceListener which facades all
> ResourceChangeListeners. And that 1 will imv become the new bottleneck.
>
> I fail to see how this will improve the filtering that we're trying to
> achieve in Oak - or is there a 1:1 mapping with the above mechanism still
> planned?
>
The 1:1 mapping (or even an optimization as there might be some overlap
between several listeners) was and is the goal of this approach.
If that isn't implemented in this way atm, I think this is a big
oversight and needs to be fixed asap.
Regards
Carsten
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org