tags:

views:

251

answers:

3

My application uses urn:uuid as URIs for entities. Of course, when I get, e.g. RDF information about a resource, the referred entities (subject or objects) will contain URIs in the urn:uuid schema. To fetch the representation of the new entity, possibly in a REST way, I need a "resolver", similar in some way to dx.doi.org for DOIs. Another case could be the resolution of a isbn: URI, so to obtain a sensible representation of this URI.

My question is relative to what's out there, in terms of proposed standards, for URI-to-representation-URL resolution.

edit: bumping the question

+4  A: 

An UUID is a univerally unique identifier, so I don't see how you would be able to resolve a uuid I just genereated (E.g. 3136aa1a-fec8-11de-a55f-00003925d394) to something usefull.

Only if you manage a database of uuids somewhere, you can retrieve more from it. Or you would have to ask everyone/everything "Do you know this uuid?"

The urn:uuid definition defines a clear space of unique identifiers. you can use for defining something truely unique. But as nobody else can guess its value, you can't derive information from it.

Bert Huijben
Exactly, what I'm asking is if there's a standard for asking "do you know this uuid?"
Stefano Borini
+2  A: 

There is no standard (proposed or otherwise) for resolving a URN. It's just a name (Uniform Resource NAME) and may have arbitrary meaning.

XML/RDF creates some confusion by using URNs which do resolve because they happen to also be URLs (Uniform Resource Locators) which point to objects describing their meaning, but this is merely a convention. They merely have to be unique and always mean the same thing.

If you are developing an application, you might want to consider use URNs which are also resolvable URLs for items with fixed meaning, and randomly generated URN's in the urn:uuid namespace to identify instances of objects.

That sounded about as confusing as the RDF spec:-)

Quick example:

Tiger: http://www.example.com/animals/tiger
Instance of a Tiger: urn:uuid:9a652678-4616-475d-af12-aca21cfbe06d

There might be a HTML page at http://www.example.com/animals/tiger, but there doesn't have to be. It's merely a convention.

[Additional Clarification Added]

The distinction here is between URNs (Names) and URLs (Locations).

A URN just names something. It's not a location of anything.

URLs are valid URNs, so you can use a URL for a URN if you want to.

In the above example, I could use e.g. http://www.example.com/tigers/9a652678-4616-475d-af12-aca21cfbe06d as the name of my tiger. I could put something at that address. But what would I put there? You can't download an instance of a tiger using http!

The convention in RDF is that if a URN is also a URL, it will point at some documentation defining what the name means.

What RDF is trying to give you is a convention for naming things which ensures that when two people use the same name, they mean the same thing. The UUID specification allows you to generate a unique name for something which is not likely to be used by anything else. But it's just a name, and there's no way of turning it into a thing.

Hope this helps.

MZB
Yes, but once I tell someone "this is the object urn : urn:uuid:9a652678-4616-475d-af12-aca21cfbe06d" how can it find its URL ? Who is in charge of resolving the urn to the location of the representation, and with what protocol is the resolution performed. As you say, there's no standard, but that would make any mapping between any urn and its location impossible.
Stefano Borini
It doesn't have a URL. It's a name, not a location. This is the distinction I'm trying to make. (Confused the hell out of me the first time I came across URNs too). I'll add some more clarification to the answer.
MZB
Your answer is very insightful and I learned something from it. Thanks. However, I gave the tickmark to deepwaters because I got some pointers to see that the issue is outstanding even at ietf.
Stefano Borini
Always good to know an answer was helpful. Thanks.
MZB
Minor quibble, AFAIK a URL is not a URN: http://www.w3.org/TR/uri-clarification/ I think (without looking at the RDF standard) that objects are named with URIs, meaning you can use a URL wherever you use a URN, since they are both URIs.
wds
@wds That has to be one of the most obscure clarification documents the W3C has ever written! You are correct in that the RDF spec is in terms of URIs (although the question was about URNs). Better clarification of the distinction can be found in http://www.ietf.org/rfc/rfc2396.txt section 1.2.
MZB
@Mike: It doesn't help that the clarification isn't very clearly written. :-) I still think you're technically wrong when you say "URLs are valid URNs" (they are both valid URIs). Oh and the W3 note also exists as an RFC, just can't remember the number.
wds
@wds: ... and you are also correct that I should have (mostly) referred to URIs not URNs. (Have I managed to confuse the other reader of this comment stream yet by agreeing with your correction in an obscure enough way? :-) Cheers.)
MZB
+2  A: 

The concluded URN Working Group of the IETF has also done some work on resolving URNs and published quite a few RFCs on this topic. A list of references is contained in the group charter. Maybe some of them help you.

deepwaters
I grant you the tickmark because indeed I found many RFC on this issue, and it is definitely a relevant starting point. This one in particular looks interesting http://www.ietf.org/rfc/rfc2483.txt
Stefano Borini