jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2857) Support sequential (non-random) node ids
Date Wed, 05 Jan 2011 08:23:46 GMT

    [ https://issues.apache.org/jira/browse/JCR-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977678#action_12977678
] 

Thomas Mueller commented on JCR-2857:
-------------------------------------

Sequential node ids are much faster than random node ids. I can't think of *any* case where
random ids are faster. For the 'append only' use case, I believe sequential node ids are the
fastest possible solution. 

In many (most?) cases multiple nodes are created at a time (example: nt:file / nt:resource).
Those node groups are then often accessed at the same time. Even if only two nodes are generated
at a time on average, the node id index is twice as efficient when using sequential node ids.

Sequential node ids don't 'expose' anything. They only improve the performance characteristic.
How node ids are generated doesn't affect the API in any way. The only problem with sequential
node ids (that I know of) is when using a cluster, and when importing nodes from other repositories
with trying to preserve the node ids. For such cases, random node ids are easier to work with.

How much sequential node ids will affect real uses cases is not clear. This needs to be tested.
Testing it is much simpler if Jackrabbit supports sequential node ids in the default build
(but of course disabled by default). Therefore, unless there is strong opposition, I will
to apply my patch in the next days.

Possible enhancements: Support configuring the most significant bits in the repository.xml,
or take the most significant bits from the unique repository id / cluster node id. Implement
a 'cluster aware' node id generator that doesn't need configuration.


> Support sequential (non-random) node ids
> ----------------------------------------
>
>                 Key: JCR-2857
>                 URL: https://issues.apache.org/jira/browse/JCR-2857
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>         Attachments: jcr-2857.patch
>
>
> Currently, node ids are generated using a (cryptographically secure pseudo-) random number
generator. This has a many advantages (easy to implement, easy to merge nodes from multiple
repositories or cluster nodes), but is a performance bottleneck for large repositories.
> In addition to generating random node ids, Jackrabbit should support generating sequential
node ids.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message