[Nepomuk] [RFC] Nepomuk Resource naming convention

Vishesh Handa me at vhanda.in
Wed Feb 13 14:46:11 UTC 2013


On Wed, Feb 13, 2013 at 8:08 PM, Matthew Dawson <matthew at mjdsystems.ca>wrote:

> As it has been explained to me, the chances of generating duplicate UUIDs
> is
> so small as to not exist (even taking into account such things as the
> Birthday
> Paradox).  I don't think worrying about it is worth it.
>

Then maybe I should just remove the check? It'll be a lot simpler.



> That being said, the increasing number thing is useful too.  Three issues I
> quickly forsee:
> 1) Is this a hot path?  Since only one id can generated at a time, it needs
> proper locking.
>

QAtomicInt


> 2) It is critically important that you store the integer before the new
> resource, since otherwise you may end up with a duplicate in case of system
> failures.  And checking for a duplicate's existance brings you back to
> square
> one.
>

I'm not sure what you mean by store the integer.



> 3) What happens when the number wraps around (if that is possible)?
>

That's not exactly possible.


-- 
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130213/4e455e10/attachment.html>


More information about the Nepomuk mailing list