You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2013/11/07 00:35:18 UTC

[jira] [Commented] (OAK-1121) Enhance observation mechanism to only listen to cluster local changes

    [ https://issues.apache.org/jira/browse/OAK-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13815448#comment-13815448 ] 

Alexander Klimetschek commented on OAK-1121:
--------------------------------------------

I think this information can be applied earlier already and might save some cycles: instead of filtering out within the ListenerThreads of the jcr observation bridge ([inside ChangeProcessor|http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?r1=1536832&r2=1536831&pathrev=1536832]), this no-external flag could be set on the ChangeDispatcher.Listener and inside ChangeDispatcher#add one would never fill the changeSet queue for those Listeners with external events in the first place (identified with {{info == null}}). This would need to require a no-external flag being passed on the ChangeDispatcher#newListener() method.

> Enhance observation mechanism to only listen to cluster local changes
> ---------------------------------------------------------------------
>
>                 Key: OAK-1121
>                 URL: https://issues.apache.org/jira/browse/OAK-1121
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: jcr
>            Reporter: Thomas Mueller
>            Assignee: Michael Dürig
>             Fix For: 0.11
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.1#6144)