Use pseudo URIs for an id

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com

A long article, but this is interesting:

When facing the problems above, my team at SoundCloud started exploring alternatives that would allow for us to have simple, scalar values that were still rich enough to act as good identifiers across our hundreds of microservices. Reading through decades of industry work on the matter, we found something simple that could help us: Uniform Resource Names, or URNs. URNs were a type of Uniform Resource Identifiers (URIs) that, as opposed to URLs, were only concerned with the identifier for a resource, but not with how to locate it.

The specification allowed for us to create structured identifiers that would contain information about the object’s type. This means that instead of the confusion created by an id of 123, we would have ids that looked like:

urn:tracks:123
urn:users:123
urn:comments:123
urn:artwork:123
urn:playlists:123

As we iterated on our approach, we have decided to follow more recent recommendations and not limit our identifiers to the deprecated concept of URN. Instead, we have decided to make them a type of URI with a private schema. This led us to identifiers that look like:

soundcloud:tracks:123
soundcloud:users:123
soundcloud:comments:123
soundcloud:artwork:123
soundcloud:playlists:123

Source