There are URN namespaces that refer to other namespaces (notably OIDs) and many things can indeed be specified. For example: * A UK company: `urn:oid:1.2.826.0.1. ` * IBAN account: `urn:oid:1.0.13616: ` (note that there's also a URI scheme for this) * A publication: `urn:isbn: ` Chances are that a URN exists, or, if not, you can get a PEN from IANA and then use the `urn:oid` scheme. However, the reason URNs don't hav…
Good points. I think what I will likely do is {"scheme": "business:DK:CRV", "id": "123456789"} to refer to a Danish business in the CRV registry, and {"scheme": "business:NO:ORG", "id": ..} for a corresponding Norwegian business, and {"scheme": "nin:DE", "id": "..."} for a German citizen. (This is to refer to "a legal entity that can own something and that we have an agreement with") I totally agree things require sp…
Ask HN: Why are URNs not more popular?
41–50 of 64 posts
Re: Ask HN: Why are URNs not more popular?
#42Earlier quoted context omitted.
I think this probably covers it the best. In terms of the semantic web, trying to semantically interpret the URN (as OP suggests) also seem like a conceptual mismatch, as there are other mechanisms that allow for the same thing in a more "robust" way. E.g. in RDF one could pack all the semantics into the datatype of a literal like `Norwegian account number "12345678902"` -> "12345678902"^^ http://example.com/accountN…
Content-addressed RDF (possibly with the help of hashlinks and/or ERIS) feels like another good way to solve data stability/mutability, without introducing a package manager in the mix.
I think package managers are in general a pretty good abstraction that can foster structured collaboration across independent (but communicating) parties. It can also enable standardization-via-usage rather than standardization-via-authority, which I think has always been all too common in the semantic data space.
Plow is at its core also very much based on content-addressing, where after the dependency resolution phase, we mostly deal with the hashes of the package contents rather than their name-based identifiers. That also has the nice side-effects that you could easily host a private artifact storage that retrieves the packages for on-premise usage. The public package index is also hosted in a git repository, so all the building blocks would be there that you can record the whole state of the system in a content-addressable manner if you wanted to.
Re: Ask HN: Why are URNs not more popular?
#43Earlier quoted context omitted.
Good points. I think what I will likely do is {"scheme": "business:DK:CRV", "id": "123456789"} to refer to a Danish business in the CRV registry, and {"scheme": "business:NO:ORG", "id": ..} for a corresponding Norwegian business, and {"scheme": "nin:DE", "id": "..."} for a German citizen. (This is to refer to "a legal entity that can own something and that we have an agreement with") I totally agree things require sp…
> and {"scheme": "nin:DE", "id": "..."} for a German citizen. (This is to refer to "a legal entity that can own something and that we have an agreement with") Off-topic, but there isn't really a general ID number for German citizens. There are some numbers for social security or tax purposes, but most people wouldn't give them to other entities and people wouldn't think of them when asked about a ID number in other c…
Re: Ask HN: Why are URNs not more popular?
#44Re: Ask HN: Why are URNs not more popular?
#45Re: Ask HN: Why are URNs not more popular?
#46There are URN namespaces that refer to other namespaces (notably OIDs) and many things can indeed be specified. For example: * A UK company: `urn:oid:1.2.826.0.1. ` * IBAN account: `urn:oid:1.0.13616: ` (note that there's also a URI scheme for this) * A publication: `urn:isbn: ` Chances are that a URN exists, or, if not, you can get a PEN from IANA and then use the `urn:oid` scheme. However, the reason URNs don't hav…
Good points. I think what I will likely do is {"scheme": "business:DK:CRV", "id": "123456789"} to refer to a Danish business in the CRV registry, and {"scheme": "business:NO:ORG", "id": ..} for a corresponding Norwegian business, and {"scheme": "nin:DE", "id": "..."} for a German citizen. (This is to refer to "a legal entity that can own something and that we have an agreement with") I totally agree things require sp…
Yeah, I think in any case you need to end up with your own solution (personal ID numbers are especially messy because a single person might have none or many). However, may I suggest a less verbose format? Parsing JSON looks overkill for the purposes of IDs (I'm assuming this is something you'd want to index)
For example, you could go with `urn:::id::::`
Re: Ask HN: Why are URNs not more popular?
#47OP here. Thanks for a lot of useful insights and references. An overall comment about a lot of the replies: A lot seem to say "you do not want to use URN because X" in much the same way I think that one might criticise JSON when JSON was launched: What is the point of using JSON? Don't you realize that both systems still need to agree on a custom protocol? Yet JSON is wildly successful. I could have worded my initial…
From a quick google, urn isn't built into browsers. There is a urn-parser package on npm, but it hasn't been updated in 5 years, and has exactly 0 tests. That package tells me to use the URI package, which has an open issue saying it's broken in firefox since 2011!
I have a general policy of not writing parsers wherever possible, as they are (a) really hard to get 100% right, and (b) if no-one can be bothered to keep at least one parser up to date, then it doesn't feel like a well supported language!
Re: Ask HN: Why are URNs not more popular?
#48Granted, anything can be made to look like a mess, but it seems that JSON is much more enjoyable than XML, and such preferences tend to make a whole lot more impact on what is going to be used than technical/academic prowess. Applies to most things, and factors in to what kind/type of person you get when you talk to developers at a startup, a bank, general commerce, a FAANG or a technology provider. Not everyone seems to enjoy the kinds of people that "exclusively write complex systems software" or "exclusively write business software for the money" just like not everyone likes "exclusively writes software because they enjoy it", and that's fine. But it directly impact adoption of stuff.
URNs, URIs, and UTIs (and UBL) are all fine examples of technology designed to solve a thing, but also fine examples of not getting the adoption you'd thing it gets when it is "technically correct".
Re: Ask HN: Why are URNs not more popular?
#49OP here. Thanks for a lot of useful insights and references. An overall comment about a lot of the replies: A lot seem to say "you do not want to use URN because X" in much the same way I think that one might criticise JSON when JSON was launched: What is the point of using JSON? Don't you realize that both systems still need to agree on a custom protocol? Yet JSON is wildly successful. I could have worded my initial…
This does not apply for URNs - the "custom protocol" replacing URNs is simply transferring a string, so choosing URNs doesn't save most apps anything.
The other aspect is that I (and looking at the other comments, probably most people) don't really identify with your use case i.e. "a standard way to refer to "an ID taken from an existing public registry"". The common use case for handling IDs from an existing registry is in systems where the requirements specify a particular existing registry, not an arbitrary one; and any URN which specifies some other registry should be rejected as invalid, so including that in the data is just useless overhead.
In general, I consider that is useful to have a reference to a specific registry if and only if I have some special integration with that registry. I.e. it's useful to denote that this is a registration number from the Danish company registry iff I do something specific with the Danish company registry (e.g. fetching whether that registration is valid and the company has not been liquidated). And in that case, I don't really need a universal format to represent arbitrary numbers, I need an 'enum' showing that this is one of the acceptable (closed!) list of number types the system can understand, or possibly even split them in separate fields in JSON/XML/whatever.
On the other hand, if try to I imagine some use cases where really there is a need for processing IDs from an open set of many registries (which exist but IMHO are quite rare) then in those cases the interpretation of these IDs is generally not done by the computer system, they are transferred and stored as-is, and perhaps later printed shown to a human. In this case, having a machine-readable URN is not an advantage, as the computer system doesn't care which registry is being used (so it doesn't need to tell that its looking at an ID in a registry, much less which registry) and potential human consumers of the data (end users like customers, accountants, etc - from whom a URN is definitely not 'self-documentary') would not be able to write or decode URNs, they would not recognize that a URN represents an ID in a registry or tell which registry is used, they would need a different, human-readable format for that.
Re: Ask HN: Why are URNs not more popular?
#50Earlier quoted context omitted.
Why would you want to abstract over tel: vs fax:? If you try to send a fax to a phone number, or call a fax from your phone, the end result is a confused human. Also, what “more strict definition” do you have in mind? Sure, MSISDNs are digits only and always include the country code, but any reasonable software dealing with phone numbers could easily parse out the extra punctuation (and possibly fill in a country cod…
I guess if you are a phone company and want to track which phone numbers are registered to which client, you don't really care if the number goes to a phone or fax machine?