Hacker News new | ask | show | jobs
by vxNsr 2167 days ago
> I didn't think URLs have to be persistent - that was URNs. This is the probably one of the worst side-effects of the URN discussions. Some seem to think that because there is research about namespaces which will be more persistent, that they can be as lax about dangling links as they like as "URNs will fix all that". If you are one of these folks, then allow me to disillusion you.

Most URN schemes I have seen look something like an authority ID followed by either a date and a string you choose, or just a string you choose. This looks very like an HTTP URI. In other words, if you think your organization will be capable of creating URNs which will last, then prove it by doing it now and using them for your HTTP URIs. There is nothing about HTTP which makes your URIs unstable. It is your organization. Make a database which maps document URN to current filename, and let the web server use that to actually retrieve files.

Did this fail as a concept? Are there any active live examples of URNs?

3 comments

URN namespace registrations are maintained by IANA [1].

One well-known example is the ISBN namespace [2], where the namespace-specific string is an ISBN [3].

The term 'URI' emerged as somewhat of an abstraction over URLs and URNs [4]. People were also catching onto the fact that URNs are conceptually useful, but you can't click on them in a mainstream browser, making its out-of-the-box usability poor.

DOI is an example of a newer scheme that considered these factors extensively [5] and ultimately chose locatable URIs (=URLs) as their identifiers.

[1] https://www.iana.org/assignments/urn-namespaces/urn-namespac... [2] https://www.iana.org/assignments/urn-formal/isbn [3] https://en.wikipedia.org/wiki/International_Standard_Book_Nu... [4] https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Hi... [5] https://www.doi.org/factsheets/DOIIdentifierSpecs.html

The most common place I have seen them is in XML namespaces, eg in Jabber like xmlns='urn:ietf:params:xml:ns:xmpp-streams'

When a protocol ID is a URI it is common to use a URL rather than a URN so that the ID can serve as a link to its own documentation.

There is a bonkers DNS record called NAPTR https://en.wikipedia.org/wiki/NAPTR_record which was designed to be used to make the URN mapping database mentioned towards the end of your quote, using a combination of regex rewriting and chasing around the DNS. I get the impression NAPTR was never really used for resolving URNs but it has a second life for mapping phone numbers to network services.

GS1 (the supermarket item barcode people) integrated their global-trade system that’s used by literally everyone with URN URIs - I worked with them when doing an RFID project a few years ago. In practice it meant just prefixing “urn:” to everything - it felt silly.