<commit_before>---
layout: post
title: Persistent Identifiers and URLs
tags: [persistent identifier]
---

Just like the rest of the internet, much of our scholarly infrastructure is built around the Hypertext Transfer Protocol (HTTP), increasingly HTTPS for security, and soon [HTTP/2](https://http2.github.io/) for better performance. In this infrastructure Universal Resource Locators (URLs) are essential to locate resources (sic) such as scholarly articles, datasets, researchers, organizations, or grants. While this works for the most part, there are some issues with URLs - not specific to scholarly content, but particularly import here:<!--more-->

1. multiple URLs can point to the same resource
2. URLs can be long and look ugly
3. URLs can change or break, making it hard or impossible to locate the resource
4. we are used to central indexes (or databases) describing these resources, allowing us to do sophisticated queries not possible in a generic web search, e.g. find all publications by author <NAME>, published since 2012.

No. 1 is a problem relevant to all URLs, e.g. web searches or liking/commenting a particular web page. Originally suggested by Google, [Canonical URLs](https://support.google.com/webmasters/answer/139066?hl=en) are essential for services such as Facebook or [Hypothes.is](https://hypothes.is/blog/cross-format-annotation/). They have been formalized in [rfc6596](http://tools.ietf.org/html/rfc6596) and are commonly used.

No. 2 can be a problem, in particular if we are not careful in designing appropriate URLs for landing pages (see next paragraph), but rather use something long and unreadable that also includes query parameters, etc. If we have no control over how the URL looks like, we can use URL shortener services such as [bit.ly](https://bitly.com/), which of course have become a common sight on the web. [ShortDOIs](http://shortdoi.org/) are an URL shortener for DOIs, but they don't seem to have gained much traction.

No. 3 is a particularly important issue, commonly referred to as **link rot** and described extensively for the scholarly literature, e.g. by [@klein_2014bj]. There are several technical solutions to this problem, a common approach is to use a landing page for the resource that will never change (and follows the recommendations by <NAME> for [Cool URIs]((http://www.w3.org/Provider/Style/URI.html))), and then use redirection to point to the current location of the resource. This is easily for changes of the URL path using web server [redirect rules](http://httpd.apache.org/docs/2.4/rewrite/remapping.html). It gets more complicated if the server name also changes, in particular if it is the server holding the landing page. Thinking this through you realize that the only way this can be done on a larger scale is via one or more centralized services that not only provide the technical infrastructure for a central redirection (or resolver) service, but also come with a social contract of rules that everyone submitting URLs to the service has to follow - a major difference to URL shorteners, which don't solve the link rot problem.

The above is of course a description of the DOI service provided by CrossRef, DataCite, and others, as well as similar persistent identifier services. Unfortunately some persistent identifier services don't do the above: they create and use persistent identifiers, but there is no central resolver service that maps these identifiers back to URLs. This breaks the integration with the bigger scholarly infrastructure based on URLs. One common example are nucleotide sequences such as U65091 [@U65091], there is no single corresponding URL because the sequence can be found in all three main nucleotide databases: [http://www.ncbi.nlm.nih.gov/nuccore/U65091](http://www.ncbi.nlm.nih.gov/nuccore/U65091), [http://www.ebi.ac.uk/ena/data/view/U65091](http://www.ebi.ac.uk/ena/data/view/U65091), and [http://getentry.ddbj.nig.ac.jp/getentry/na/U65091](http://getentry.ddbj.nig.ac.jp/getentry/na/U65091). It would help to have a central resolver, e.g. [http://nucleotide.org/U65091](http://nucleotide.org/U65091) that then redirects to one of the three databases based on geographical location or user preference.

There are also problems with DOIs. They use the [Handle](http://www.handle.net/) system to resolve the identifier to a location, and this system was built in the 1990s as infrastructure [independent of](http://www.handle.net/faq.html) URLs or DNS (Domain Name Service), at a time when it wasn't clear yet that URLs and associated standards would become ubiquitous. I don't have numbers, but practically all DOIs are of course now resolved to URLs using the [DOI proxy server](http://www.doi.org/factsheets/DOIProxy.html) at [http://doi.org](http://doi.org) (preferred) or [http://dx.doi.org](http://dx.doi.org). One main consequence of this is that DOIs are frequently not written as URLs - e.g. doi:10.5555/12345678 instead of [http://doi.org/10.5555/12345678](http://doi.org/10.5555/12345678) - again breaking the integration with the bigger scholarly infrastructure. The CrossRef [DOI display guidelines](http://www.crossref.org/02publishers/doi_display_guidelines.html) clearly state that DOIs should be written as URLs in *the online environment*, which basically is whenever DOIs are used, as PDFs and even Word documents know how to handle URLs. Unfortunately this guideline is still frequently ignored. The above is of course also true for other persistent identifiers using the Handle system, e.g. [EPIC](http://www.pidconsortium.eu/).

The other problem with the DOI system is that it doesn't address issue No. 4, i.e. provide a central metadata index for the resources that use the system. This job is left to the DOI registration agencies such as CrossRef and DataCite, who have implemented a central metadata store (e.g. [CrossRef](http://search.crossref.org/), [DataCite](http://search.datacite.org)) in different ways (e.g. using different metadata schemata), or not at all. This means that we have to look in several places to find all DOis associated with author <NAME>, published since 2012. Obviously we are used to looking up information in multiple places, but not being able to look up the metadata for a DOI without some extra work (finding out the registration agency for the DOI and then going to the respective metadata store) is a problem. One way around these problems is to use the [DOI Content Negotiation Service](http://www.crosscite.org/cn/).

Another problem with the DOI system is more a social than a technical issue. Neither CrossRef nor DataCite seem to enfource that DOIs should alsways resolve to URLs when using a computer program. DOI resolution for humans works fine, but computers, e.g. command line tools such as cURL, can run into issues such as requiring cookies, javascript or user input, or permission problems getting to the journal landing page (see [this earlier blog post](http://blog.martinfenner.org/2013/10/13/broken-dois) for some numbers). People seem to forget that a DOI that is not actionable is not really useful, and that scholarly infrastructure is not only used by people, but of course also by automated tools.

The persistent identifiers used in our scholarly infrastructure would benefit from a clearer focus on the problems they should solve, startin with No. 1-4 above. One problem is that we probably focus too much on the persistence problem, implied also by the term **persistent identifier** or **PID**. What we have neglected is the resolvable problem, i.e. making as easy as possible to get from the persistent identifier to the resource and/or its metadata. Based on the [Den Haag Manifesto](http://www.knowledge-exchange.info/Default.aspx?ID=462) and suggested by Todd Vision, we therefore proposed the term **trusted identifier** with the following characteristics in the conceptual model of interoperability for the [ODIN Project](http://odin-project.eu/) [@odin_2013]:

* are unique on a global scale, allowing large numbers of unique identifiers
* resolve as HTTP URI’s with support for content negotiation, and these HTTP
URI’s should be persistent.
* come with metadata that describe their most relevant properties, including a
minimum set of common metadata elements. A search of metadata elements
across all trusted identifiers of that service should be possible.
* are interoperable with other identifiers through metadata elements that describe
their relationship.
* are issued and managed by an organization that focuses on that goal as its
primary mission, has a sustainable business model and a critical mass of member organizations that have agreed to common procedures and policies, has a governing body, and is committed to using open technologies.

While not directly relevant for resolving persistent identifiers as URLs, the last point is really important for any persistent identifier infrastructure, described in detail recently by [@bilder_2015].

If I would design a persistent identifier service today (as if we would need yet another persistent identifier service), I would build the system around an URL shortening service that I control. The URLs could look very similar to what we have with DOIs now, e.g. [http://doi.org/10.5555/12345678](http://doi.org/10.5555/12345678), but it would be clear that persistent identifiers are URLs, not something separate. Plus we could take adavantage of all the lessons learned - and possibly even reuse open source code - with URL shorteners, which are much more widely used than scholarly persistent identifiers.

## References<commit_msg>added link to Thomson Reuters data report<commit_after>---
layout: post
title: Persistent Identifiers and URLs
tags: [persistent identifier]
---

Just like the rest of the internet, much of our scholarly infrastructure is built around the Hypertext Transfer Protocol (HTTP), increasingly HTTPS for security, and soon [HTTP/2](https://http2.github.io/) for better performance. In this infrastructure Universal Resource Locators (URLs) are essential to locate resources (sic) such as scholarly articles, datasets, researchers, organizations, or grants. Read [this](http://site.thomsonreuters.com/site/data-identifiers/) recent Thomson Reuters report for a good recent perspective on this topic. While this works for the most part, there are some issues with URLs - not specific to scholarly content, but particularly import here:<!--more-->

1. multiple URLs can point to the same resource
2. URLs can be long and look ugly
3. URLs can change or break, making it hard or impossible to locate the resource
4. we are used to central indexes (or databases) describing these resources, allowing us to do sophisticated queries not possible in a generic web search, e.g. find all publications by author <NAME>, published since 2012.

No. 1 is a problem relevant to all URLs, e.g. web searches or liking/commenting a particular web page. Originally suggested by Google, [Canonical URLs](https://support.google.com/webmasters/answer/139066?hl=en) are essential for services such as Facebook or [Hypothes.is](https://hypothes.is/blog/cross-format-annotation/). They have been formalized in [rfc6596](http://tools.ietf.org/html/rfc6596) and are commonly used.

No. 2 can be a problem, in particular if we are not careful in designing appropriate URLs for landing pages (see next paragraph), but rather use something long and unreadable that also includes query parameters, etc. If we have no control over how the URL looks like, we can use URL shortener services such as [bit.ly](https://bitly.com/), which of course have become a common sight on the web. [ShortDOIs](http://shortdoi.org/) are an URL shortener for DOIs, but they don't seem to have gained much traction.

No. 3 is a particularly important issue, commonly referred to as **link rot** and described extensively for the scholarly literature, e.g. by [@klein_2014bj]. There are several technical solutions to this problem, a common approach is to use a landing page for the resource that will never change (and follows the recommendations by <NAME> for [Cool URIs]((http://www.w3.org/Provider/Style/URI.html))), and then use redirection to point to the current location of the resource. This is easily for changes of the URL path using web server [redirect rules](http://httpd.apache.org/docs/2.4/rewrite/remapping.html). It gets more complicated if the server name also changes, in particular if it is the server holding the landing page. Thinking this through you realize that the only way this can be done on a larger scale is via one or more centralized services that not only provide the technical infrastructure for a central redirection (or resolver) service, but also come with a social contract of rules that everyone submitting URLs to the service has to follow - a major difference to URL shorteners, which don't solve the link rot problem.

The above is of course a description of the DOI service provided by CrossRef, DataCite, and others, as well as similar persistent identifier services. Unfortunately some persistent identifier services don't do the above: they create and use persistent identifiers, but there is no central resolver service that maps these identifiers back to URLs. This breaks the integration with the bigger scholarly infrastructure based on URLs. One common example are nucleotide sequences such as U65091 [@U65091], there is no single corresponding URL because the sequence can be found in all three main nucleotide databases: [http://www.ncbi.nlm.nih.gov/nuccore/U65091](http://www.ncbi.nlm.nih.gov/nuccore/U65091), [http://www.ebi.ac.uk/ena/data/view/U65091](http://www.ebi.ac.uk/ena/data/view/U65091), and [http://getentry.ddbj.nig.ac.jp/getentry/na/U65091](http://getentry.ddbj.nig.ac.jp/getentry/na/U65091). It would help to have a central resolver, e.g. [http://nucleotide.org/U65091](http://nucleotide.org/U65091) that then redirects to one of the three databases based on geographical location or user preference.

There are also problems with DOIs. They use the [Handle](http://www.handle.net/) system to resolve the identifier to a location, and this system was built in the 1990s as infrastructure [independent of](http://www.handle.net/faq.html) URLs or DNS (Domain Name Service), at a time when it wasn't clear yet that URLs and associated standards would become ubiquitous. I don't have numbers, but practically all DOIs are of course now resolved to URLs using the [DOI proxy server](http://www.doi.org/factsheets/DOIProxy.html) at [http://doi.org](http://doi.org) (preferred) or [http://dx.doi.org](http://dx.doi.org). One main consequence of this is that DOIs are frequently not written as URLs - e.g. doi:10.5555/12345678 instead of [http://doi.org/10.5555/12345678](http://doi.org/10.5555/12345678) - again breaking the integration with the bigger scholarly infrastructure. The CrossRef [DOI display guidelines](http://www.crossref.org/02publishers/doi_display_guidelines.html) clearly state that DOIs should be written as URLs in *the online environment*, which basically is whenever DOIs are used, as PDFs and even Word documents know how to handle URLs. Unfortunately this guideline is still frequently ignored. The above is of course also true for other persistent identifiers using the Handle system, e.g. [EPIC](http://www.pidconsortium.eu/).

The other problem with the DOI system is that it doesn't address issue No. 4, i.e. provide a central metadata index for the resources that use the system. This job is left to the DOI registration agencies such as CrossRef and DataCite, who have implemented a central metadata store (e.g. [CrossRef](http://search.crossref.org/), [DataCite](http://search.datacite.org)) in different ways (e.g. using different metadata schemata), or not at all. This means that we have to look in several places to find all DOis associated with author <NAME>, published since 2012. Obviously we are used to looking up information in multiple places, but not being able to look up the metadata for a DOI without some extra work (finding out the registration agency for the DOI and then going to the respective metadata store) is a problem. One way around these problems is to use the [DOI Content Negotiation Service](http://www.crosscite.org/cn/).

Another problem with the DOI system is more a social than a technical issue. Neither CrossRef nor DataCite seem to enfource that DOIs should alsways resolve to URLs when using a computer program. DOI resolution for humans works fine, but computers, e.g. command line tools such as cURL, can run into issues such as requiring cookies, javascript or user input, or permission problems getting to the journal landing page (see [this earlier blog post](http://blog.martinfenner.org/2013/10/13/broken-dois) for some numbers). People seem to forget that a DOI that is not actionable is not really useful, and that scholarly infrastructure is not only used by people, but of course also by automated tools.

The persistent identifiers used in our scholarly infrastructure would benefit from a clearer focus on the problems they should solve, startin with No. 1-4 above. One problem is that we probably focus too much on the persistence problem, implied also by the term **persistent identifier** or **PID**. What we have neglected is the resolvable problem, i.e. making as easy as possible to get from the persistent identifier to the resource and/or its metadata. Based on the [Den Haag Manifesto](http://www.knowledge-exchange.info/Default.aspx?ID=462) and suggested by Todd Vision, we therefore proposed the term **trusted identifier** with the following characteristics in the conceptual model of interoperability for the [ODIN Project](http://odin-project.eu/) [@odin_2013]:

* are unique on a global scale, allowing large numbers of unique identifiers
* resolve as HTTP URI’s with support for content negotiation, and these HTTP
URI’s should be persistent.
* come with metadata that describe their most relevant properties, including a
minimum set of common metadata elements. A search of metadata elements
across all trusted identifiers of that service should be possible.
* are interoperable with other identifiers through metadata elements that describe
their relationship.
* are issued and managed by an organization that focuses on that goal as its
primary mission, has a sustainable business model and a critical mass of member organizations that have agreed to common procedures and policies, has a governing body, and is committed to using open technologies.

While not directly relevant for resolving persistent identifiers as URLs, the last point is really important for any persistent identifier infrastructure, described in detail recently by [@bilder_2015].

If I would design a persistent identifier service today (as if we would need yet another persistent identifier service), I would build the system around an URL shortening service that I control. The URLs could look very similar to what we have with DOIs now, e.g. [http://doi.org/10.5555/12345678](http://doi.org/10.5555/12345678), but it would be clear that persistent identifiers are URLs, not something separate. Plus we could take adavantage of all the lessons learned - and possibly even reuse open source code - with URL shorteners, which are much more widely used than scholarly persistent identifiers.

*Update 6/4/15: added link to Thomson Reuters [report](http://site.thomsonreuters.com/site/data-identifiers/) on identifiers and open data.*

## References
{'fraction_non_alphanumeric': 0.06677924470371507, 'fraction_numerical': 0.019240609968273464, 'mean_word_length': 4.715998830067271, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 24, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6029608', 'n_tokens_mistral': 5160, 'n_tokens_neox': 4615, 'n_words': 2704}