Repository navigation
Description
Currently Data Packagese must have a name attribute but do not have an id attribute.
There has been debate about both the semantics (e.g. uniqueness) of the name field and its usability for certain cases (e.g. importing datasets into a new catalog) - see #220 for extensive discussions.
Proposal
Two identifier fields:
name: SHOULD be present (and certainly required for installation etc). Name is human meaningful and is designed to support both resolution (protocol to be determined) and easy use by humans e.g. in data dependencies- (?) Have this as a MUST?
id: MAY be present. If present MUST be globally unique. Propose it is a 36 bit uuid or similar.
What is the structure of name?
name may only contain lower case alphanumeric plus _-. and / as a separator (?? should we allow other url compatible values e.g. :?)
Option 1 - 3 part
Name has the following structure:
[registry/[owner-or-namespace/]]local-name
The primary Data Package registry (assuming there is one) will have the special registry name dp
local-name MUST NOT contain a '/'
# single-part - for resolution one would anticipate these implicitly become
# `{primary-registry}/core/{name}`
finance-vix
#2 part: `registry/local-name`
# Propose that namespace MUST
# either come from a designated central data package registry if / when we have one e.g. `core/gdp`
# OR be a valid domain name e.g. `data.gov.uk/my-name` (so we can piggy back on domain name issuance)
datahub.io/xyz
data.gov.uk/xyz
#3 part:
doi/{doi} # {doi} usually has /
github.com/rgrp/court-decisions-gb
Asides
- I did think about having an initial "scheme" value e.g.
dp/core/abcorwww/data.gov.uk/xyzbut felt we were starting to reinvent the url wheel a bit too much ...* - one option I thought about was about keeping
namesingle-valued and havingidsupport the multipart option.* - What about just using DOI? Ans: DOI requires a relatively complex registration process in order to able to issue DOIs. We want anyone to be able to create data packages
- Why not just use URIs / URLs? That is an option and we should think move about it. Main disadvantages are:
- They are somewhat cumbersome
- Are liable to breakage e.g. if a registry simply moves url ... (but that may creates problems with the above too?)
- Do not translate well to local installation
- Implicitly creates relation between name and URL resolution -- what happens if you don't control any url space?
Use Cases
Why does having an identifier matter? What is used for? At the moment the use cases are not very clear.
- To refer to in e.g. dependencies
dataDependenciesfield- could we just use urls? Probably: see http://dataprotocols.org/data-package-identifier/
- To use in tooling e.g.
dpm install {data-package-name}- could we just use urls or some other more complex identifier? Probably - see http://dataprotocols.org/data-package-identifier/
- Discovery: using an identifier we can locate a data package [in a registry]
- Question: Which registry - or more generally what is the "resolution" protocol. See http://dataprotocols.org/data-package-identifier/ for more on this
- To support storing and management in a catalog or registry
- Online e.g. CKAN
- Or locally e.g.
.datapackagesor similar - a local store or cache
Note also @amercader comment: "As a Catalogue / Registry / Command Line Utility I Want Data Packages to have a global unique id So That I can sanely decide if a Data Package is the same as another one." -- though my question is why do you want to decide if it is the same?
Context
- Check out Zooko's Triangle. For names hard to have more than 2 of:
- meaningful (for humans)
- decentralized
- secure / non-colliding
Aims for name:
- be human-usable and usable in dependencies
- make possible and likely but not guarantee non-collision
- be partially distributed
Content-based naming / addressing
One attractive approach to naming that is both secure and decentralized is content-based naming based on hashes. The basic idea is you name content via the (e.g. sha1) hash of the content.
This is attractive and clever but does have 2 drawbacks:
- The name changes if the content changes (this could be a feature rather than a bug)
- The name is an opaque long string
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
- StatusShow more project fieldsNo status
Activity
rufuspollock commentedon Dec 31, 2015
@danfowler @pwalsh @mfenner @jbenet - any thoughts?
pwalsh commentedon Jan 4, 2016
I think making
nameSHOULD andidMAY means that we've removed any type of identifier from data packages, by default. TBH I'm not sure what is best... but I think ifidis not becoming a MUST, then we should leavenamea MUST.mfenner commentedon Jan 6, 2016
@rgrp thanks for summarizing the issues again, and for proposing a path forward. My view is slightly different, summarized as follows:
nameidentifiers are common for software packages. I think the use case for data is different, and aidis a better fit. One example would be hundreds of datasets only differing in the time window or geolocation they describe (e.g. gold prices). Hard to imagine how to find a common naming scheme for cases such as this oneurlsare very good unique identifiers, as they are actionable and have a name space. One important disadvantage is that a lot more infrastructure is required to generate URLsIn short my view is to
idnamewhich does not need to be globally unique (i.e. the current spec)rufuspollock commentedon Jan 29, 2016
OK. Here's the updated proposal:
id: introduce this field and define semantics as globally unique.name: probably keep this very simple as it is (at most allow a '/" in it - probably not as breaks sluggability ...)All the fancy multi-part stuff is really a bit of a confusion here as it is really about "package identifiers" for use in e.g. installation of dataDependencies. This could / should go into: http://dataprotocols.org/data-package-identifier/
@mfenner @Karissa @danfowler @pwalsh any thoughts here before we move to implement.
amercader commentedon Jan 29, 2016
Basically so you can decide whether to create a new entry on the registry or update an existing one.
If
idneeds to be globally unique, then allowing it to be a slug without a centralized registry is not really going to work, so I would strongly suggest that the spec recommends using UUIDs, an URI or another unique identifier (like the Figshare id mentioned). We can add a small note along the lines of "If unsure, use an UUID generated on this site or this one")okdistribute commentedon Jan 29, 2016
Encouraging the use of a DOI would be ideal, but any unique id scheme
(e.g., uuid) work work
On Friday, January 29, 2016, Adrià Mercader notifications@github.com
wrote:
Karissa McKelvey
http://karissa.github.io/
rufuspollock commentedon Jan 31, 2016
OK. So current new language looks like:
Having written this much I realise there is a bit of a challenge explaining to the average reader of the spec why there are two "identifier" fields and their relationship. Questions so far:
idis a SHOULD I thinknameprobably should be too.idornamebe present?nameand/or its relationship toid. Traditionally e.g. in software packagingnamewould be your unique, meaningful identifier. We could preserve some of this use here if we had a central registry (which we sort of but do not really have yet). I also feel it is pretty useful for some purposes (e.g. as a file name when installing on disk etc) and as a starting point for many people compared to a UUID.nameis human-readable and unique within a given registry (e.g. the registry this data package comes from). However, we anticipate data packages being published to and from multiple registries. As such, name may not be globally unique.idis globally unique but is likely human-opaque."okdistribute commentedon Jan 31, 2016
Yes, I like that explanation.
It would be nice if they were both 'SHOULD'
On Sun, Jan 31, 2016 at 3:58 PM, Rufus Pollock notifications@github.com
wrote:
Karissa McKelvey
http://karissa.github.io/
pwalsh commentedon Feb 1, 2016
This is complicated.
If
nameMUST be unique within a given registry (based on last explanation text), this may only be knowable after the creation of a Data Package, and even after possible publication to other registries under the same name.I understand the logic of all the various arguments here, but I really think we will fall into a hole by trying to please all and having both
nameandid, where each are a type of identifier.mfenner commentedon Feb 1, 2016
I agree with @pwalsh. This is a bit too complicated. As much as I like the human readability of
name, and understand that this is a pattern for software packages, I don't see this pattern as a good fit for data packages. While we rarely have more than a few software packages that do the same thing, we can easily have dozens or hundreds of data packages all describingUK gold pricesorweather in Paris. If we drop the idea that we have an identifier that is both human readable and globally unique, things become easier, and we can dropname.The problem with identifiers that first need to be registered, e.g.
DOI, ornamethat is unique in a registry is that this creates overhead when the package is created. For the use cases of data packages that I see, I want to be able to create them without this overhead, e.g. when I have no network connection.My suggestion is to
id, and make this auuidDOIsin another field, named for exampleother_ids. We can also put human readable identifiers such asnamein herename, as it is confusing if we also haveidtitlefor a human readable description, but this doesn't have to be uniqueI agree with @rgrp that
okdistribute commentedon Feb 1, 2016
I agree with you until you advocate to use title instead of name. Itd be
nice to keep the functionality you propose with title, but keep name as the
keyword. This way, it doesn't break backwards compatibility.
On Sunday, January 31, 2016, Martin Fenner notifications@github.com wrote:
Karissa McKelvey
http://karissa.github.io/
mfenner commentedon Feb 1, 2016
Agree about keeping
namefor backwards compatibility.pwalsh commentedon Feb 1, 2016
@mfenner +1 with the addition of @Karissa re
name.I just don't see any other way forward that will not be confusing.
jbenet commentedon Feb 1, 2016
"name"doioptional, as another attribute.id, please use uuid4 or just a large cryptographically random string.danfowler commentedon Feb 3, 2016
+1 @mfenner @Karissa on requiring
id(MUST) while also keepingnamefor backwards compatibility. I suppose this means thatnameshould, going forward, be aSHOULDproperty?One comment, if
idis required to be a UUID, why not just explicitly make the field nameuuid? I also like theother_idsapproach, and suggest an object like so:11 remaining items
pwalsh commentedon Nov 10, 2016
@rgrp @frictionlessdata/specs-working-group
On reflection, I think my last suggestion is ridiculous, as by trying to please every opinion, it serves no one particularly well.
I'm starting to swing towards what I think is the view of @rgrp being that the spec does not need a unique identifier as part of it: it is a platform-specific concern (federated or otherwise).
What we could do is reserve
idas a protected property for use as a unique identifier by implementations, and then see how it is used, or, we could requireidto be a UUID, which can be validated, and is the most implementation-neutral of all suggestions I've seen so far.@frictionlessdata/specs-working-group this has been a persistent issue, well beyond this thread. I'd love to hear additional thoughts.
jpmckinney commentedon Nov 11, 2016
I'm not sure where the proposal for
namelanded. At the top @rgrp describes a fairly complex process of assigning names that is much more labor-intensive than generating a UUID, which you can do online if you happen to be generating IDs manually.If, as @pwalsh writes, we're tending towards not having any unique identifiers, then I'm in favor of eliminating
name, which is very confusing.If we do add
id, then I'm in favor that it SHOULD be a UUID, but if some of the ecosystem already uses DOI or other identifiers (dat was mentioned above), then by all means let them continue to use those IDs in a 'grandfathered' way.joehand commentedon Nov 11, 2016
This seems like a good compromise. Global uniqueness will be hard to guarantee and only meaningful within the datapackage space. Allowing the
idto be a platform specific unique id will make it easier to use datapackages in those platforms. This would allow id's such as:These IDs will be resolvable within the specific platform but also meaningful when viewing the datapackage outside that platform. It is clear what subspace these IDs come from and where they are guaranteed to be unique.
rufuspollock commentedon Nov 17, 2016
@joehand @pwalsh good suggestions. Next steps are now clear:
idfield - which is up to users to make uniquenamenon-required and more flexible (it is basically there for registries)rufuspollock commentedon Feb 5, 2017
AGREED: will do as separate PR:
idfield which MUST be unique (e.g. uuid, doi etc)namefield is MAY and can be anything you like within reason ...Adds ID field. Closes #237
Merge pull request #369 from frictionlessdata/feature/id-name
[dp,#237,#418][s]: reintroduce id field on dp as part of #418 rework …