jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-169) Support orderable nodes
Date Fri, 06 Jul 2012 16:38:34 GMT

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

Jukka Zitting commented on OAK-169:
-----------------------------------

bq. Again I think there is a misunderstanding.

Yes, I see it now, sorry for not being precise enough. With {{Node.getNodes()}} I meant a
case where a client also iterates through the results, like this:

{code:java}
NodeIterator iterator = parent.getNodes();
while (iterator.hasNext()) {
    System.out.println(iterator.nextNode().getName());
}
{code}

With the linked list approach this would be an {{O\(n)}} instead of an {{O(1)}} operation
in terms of nodes accessed, which could become quite costly even with a fairly small number
of child nodes (think of things like a tree browser UI that just lists the available nodes
as links to more details).

Anyway, the linked list approach is certainly a valid alternative (assuming we figure out
how to merge concurrent updates to the list). Until we have performance benchmarks based on
specific use cases like the ones outlined by Carsten in place it's hard to say for sure which
approach will work best in practice. Luckily changing the implementation should be fairly
straightforward as I don't think this has many implications on other areas of Oak design.
                
> Support orderable nodes
> -----------------------
>
>                 Key: OAK-169
>                 URL: https://issues.apache.org/jira/browse/OAK-169
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: jcr
>            Reporter: Jukka Zitting
>
> There are JCR clients that depend on the ability to explicitly specify the order of child
nodes. That functionality is not included in the MicroKernel tree model, so we need to implement
it either in oak-core or oak-jcr using something like an extra (hidden) {{oak:childOrder}}
property that records the specified ordering of child nodes. A multi-valued string property
is probably good enough for this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message