jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Müller <thomas.muel...@day.com>
Subject Re: DM Rule #4: Beware of Same Name Siblings.
Date Tue, 09 Feb 2010 08:41:56 GMT

> I'm still not convinced that SNS are bad.
> If they are inefficient, that is an implementation issue that should be
> addressed in the proper place.

That's complicated. SNS means a node name index could change (because
a sibling was added or removed). If you have many SNS then removing
the first one will change the index of all others. This is like
removing the first element of a large array.

> Actually if you want to avoid SNS you have to come up with (locally but
> still) unique names.

That's a good idea.

> - These are essentially id's which contradicts rule #7

I don't think that IDs are that evil, but if you want something that
is 'human readable' you could use timestamps.

> - It gets more complicated as you have to implement some algorithm to
> generate unique names and most probably you have to deal with concurrency
> issues. Is it really necessary?

I guess we should have a utility method that generates nodes with
guaranteed unique ids or timestamps (that could be part of JCR

> I would not consider path stable, so I use UUID in URLs.

Sometimes using UUIDs is necessary (for example if you want to merge
multiple repositories at some point). Otherwise locally unique IDs
(within the same repository) should be sufficient.


View raw message