10

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.

Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
  • I'm not sure I fully understand the question, but why would there even be a representation for a given URN? – Pavel Minaev Dec 23 '09 at 17:15
  • if there is, then you should be able to resolve it, if resolving it is essential. Right now, I can talk about a isbn, but the only way to resolve this isbn is to go to amazon and buy the kindle version. Same for a DOI. You go to doi.org and resolve it. But there's no standard for that. I'm interested in the standard, if exists. – Stefano Borini Dec 24 '09 at 00:36

4 Answers4

6

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.

Demitri
  • 13,134
  • 4
  • 40
  • 41
lwho
  • 356
  • 1
  • 4
  • 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 Jan 16 '10 at 13:12
5

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

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 truly unique. But as nobody else can guess its value, you can't derive information from it.

user905686
  • 4,491
  • 8
  • 39
  • 60
Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
5

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
  • 2,071
  • 3
  • 21
  • 38
  • 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 Jan 12 '10 at 14:46
  • 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 Jan 13 '10 at 22:31
  • 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 Jan 16 '10 at 13:14
  • 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 Apr 29 '10 at 14:46
  • @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 May 06 '10 at 14:48
  • @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 May 06 '10 at 20:07
  • @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 May 13 '10 at 21:57
  • i think the tiger vs. instance of tiger is more confusing than helpful. a resource could be an instance or a category of instances. but a urn is absolute, while a url is specific scheme for locating the resource. a resource _can't have multiple urns_, but could easily have infinite urls. – Alex Moore-Niemi May 02 '15 at 23:26
1

One reason URNs exist is to give people the opportunity to create identifiers without the (implicit) responsibility of maintaining a service that describes the underlying resources. You could say that for RDF this is an advantage, but not a necessity, but you'd also be less inclined to use a particular vocabulary for example if you discovered that those HTTP URLs are no longer dereferenceable.

That being said, some URNs can be traced back to their representation. Here are some examples:

  • The ietf namespace defines several identifier schemes, so URIs like urn:ietf:rfc:2648 can be resolved if you implement the specific patterns.
  • Some namespaces are defined in other IANA registries, for example urn:ietf:params:xml: with the corresponding files for the resources.
  • Other namespaces point to already-established identifier spaces, like urn:isbn: (some metadata can be retrieved, but I don't think there is anything that will allow you to download the book from its ISBN), urn:oid:. There is also urn:publicid:, some of whose identifiers may be found somewhere deep inside ISO.

There is no general mechanism for URN resolution, and indeed there cannot be (that is also true for other URI schemes, like tag:; there are however some mechanisms such as WebFinger that facilitate URI resolution when you know the target server).

Talking specifically about UUIDs, in my opinion, the best way out of this is not to use a URN at all. If you want to use a web server for the resolution, a "standard" way is to use the genid well-known service, thus your primary URI would be something like this: http://example.org/.well-known/genid/b47df9f0-a9c5-4e8a-9762-844a33ba7a3e. If you host RDF at that location, there is nothing wrong with adding owl:sameAs <urn:uuid:b47df9f0-a9c5-4e8a-9762-844a33ba7a3e> there if you have to.

To my knowledge, there is only one method that is in use today to create a link that conveys the question "Do you know this URN?", well, kind of: a magnet: link. There is nothing in principle that would require you to use a hash there like you usually find, so something like magnet:?xt=urn:uuid:b47df9f0-a9c5-4e8a-9762-844a33ba7a3e could work, provided you have your own client that can handle that.

IS4
  • 11,945
  • 2
  • 47
  • 86