Re: [gnome-love] URIs and UUIDs



Hi


On Thu, May 30, 2013 at 4:06 PM, אנטולי קרסנר <tombackton gmail com> wrote:
Hi,

Does Gnome have any guidelines or recommendations related to URIs and
UUIDs?

I'm writing a desktop app which stores data as RDF, and I want to give
URIs to all RDF resources.

For the resources the application defines, I assume a good choice is to
use a URL, but that's pointless because I don't have any website to
point to. And still, I need some format. I can make my own, but before
that I'd like to know if Gnome has any guidelines for consistency.

Not a particular one that I know (if this is related to tracker, you should ask on their ML for help)

For user-defined resources, I can't use a URI which reveals any
information, because some of the user data is private. So I decided to
use UUIDs, but there are two UUID libraries (one used by Linux and the
other provided by OSSP, with C++ binding) and 5 versions of UUID. So
again, I'd like to know if there are any guidelines.


Useful UUIDs from RFC 4122 are either kind of random numbers (version 4) or some digest (version 3 or 5).

Unless you know you want a digest, you can just use version 4. I have proposed the following patch in glib, which you can learn from, copy or adapt to your needs:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]