On 06/08/2014 13:40, Thomas Mueller wrote:
> Hi,
>
> The following should work:
>
> - use a node type without _orderable_ child nodes
> - in each node, add a property "created" with the timestamp plus a unique
> id
Avoid re-using jcr:created as you risk to bloat the repository size due
to the fact that almost all nodes in a JCR repo has jcr:created.
Therefore avoid indexing the property or use a custom node type on which
you could restrict the index.

> - to get the first entry, use a query ("order by created")
>
> This should scale well once synchronous, orderable indexes are implemented.
>
> The problem with orderable child nodes is that in a cluster, this either
> gets many conflicts or doesn't scale well. The problem with using a tree
> structure ("/queue/2014-08/06T13/40_45") is that it's hard to implement.
>
> Please note that in Oak, right now, orderable indexes are not synchronous.
> But I think this is a problem we can and should solve soon. Orderable
> child nodes should also be improved in my view, but that's a area where we
> know there are limitations.
>
Actually if you run on Segment the index could be synchronous as Segment
serialise the writing and no conflict arise. However the
scalability/performance issues we had with current algorithm still remain.

For sake of records, history and experimental incomplete code :)

http://markmail.org/thread/qdrvm6rwnblu3rdn
https://issues.apache.org/jira/browse/OAK-1717
https://github.com/davidegiannella/jackrabbit-oak/tree/OAK-1717

Cheers
D.


Reply via email to