Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should version information contain a digest for the previous version? #7

Closed
zimeon opened this issue Apr 3, 2018 · 16 comments
Closed
Assignees
Milestone

Comments

@zimeon
Copy link
Contributor

zimeon commented Apr 3, 2018

From 2018-03-28 meeting notes there was discussion about the possibility of:

JSON-LD file for each version could contain the checksum of the JSON-LD file of the previous version

  • This eliminates the additional Namaste file in each object version
  • Each version is validated entirely by the next
  • The latest version is validated by the top level SHA (since it’s JSON LD is the same as the top level one)
  • This does not need to be computed when a new version is created, it is just a copy of the top level one
@ahankinson
Copy link
Contributor

The context being that we needed redundancy in the version-tracking, so that losing one write doesn't knock out the entire history.

@ahankinson
Copy link
Contributor

Need to clarify with example in specification

@zimeon
Copy link
Contributor Author

zimeon commented May 9, 2018

Having decided in #8 that we will use sha-512 the use of Namaste files would be rather ugly/long

@ahankinson
Copy link
Contributor

ahankinson commented May 9, 2018

Need to change the spec to use forward-version: put previous version file in new version folder

@rosy1280
Copy link
Contributor

rosy1280 commented May 23, 2018

@julianmorley: we can't put files into the previous version directory once we mint a new version.

all agree to this.

@rosy1280
Copy link
Contributor

i edited the original ticket to clarify that the JSON-LD is the JSON-LD file, not information in the JSON-LD.

@ahankinson
Copy link
Contributor

ahankinson commented May 23, 2018

@ahankinson to work up an example directory structure.

.
├── inventory.jsonld
├── v1
    └── inventory.jsonld  (v1)  <--- does not contain any inventory checksum
└── v2
    └── inventory.jsonld  (v2)  <--- contains checksum of v1 inventory.jsonld

@rosy1280
Copy link
Contributor

where do we put the checksum for the root inventory.jsonld

@ahankinson
Copy link
Contributor

@neilsjefferies to come up with an example

@ahankinson to integrate that into a gist

@neilsjefferies
Copy link
Member

Checksum of root stored in root as a inventory.jsonld.checksum file. Format of contents of the file is the same as that used for the checksum of v1/inventory.jsonld stored in v2/inventory.jsonld

@ahankinson
Copy link
Contributor

@neilsjefferies could you give a more concrete example of the format of the contents?

Perhaps we could follow the convention used by package distributors with checksum files and store them as inventory.sha512 or inventory.jsonld.sha512, with the contents of the file being something like:

[some long sha512 has] inventory.jsonld

It sounds like you're proposing something different, Neil, so it would be good to make that more concrete.

@neilsjefferies
Copy link
Member

neilsjefferies commented May 23, 2018 via email

@julianmorley
Copy link
Contributor

julianmorley commented May 31, 2018

I worry that putting the prior version inventory files in version directories will make it hard to have immutable archive versions of those directories.

If we alter the structure of the inventory file to be composed of a manifest + deltas, then the most current inventory file can be used to reconstitute the object at any prior revision. If we wished to save the prior version of the inventory file, could we rename it slightly and place it in the /logs directory?

e.g.

├── inventory.jsonld  (v3)          <-- contains checksum from v2
├── inventory.jsonld.sha512         <-- contains the checksum of current version (v3)
├── logs
    ├── inventory.jsonld.v1.sha512  <--- contains the original (v1) inventory checksum
    ├── inventory.jsonld.v1  (v1)   <--- does not contain any inventory checksum
    └── inventory.jsonld.v2  (v2)   <--- contains checksum from v1

We already know that the contents of the /logs directory can be mutable, and with a forward-delta history in the inventory, we no longer need prior inventory files to reconstruct prior versions. The prior versions are now just basically backups.

@ahankinson
Copy link
Contributor

Propose making inventory.jsonld and jsonld.sha512 as SHOULD store in the versions directory in the spec, rather than MUST. This will help with institutions migrating to OCFL as they do not need to change previously immutable objects to add version information.

@zimeon
Copy link
Contributor Author

zimeon commented Jul 11, 2018

As I read through this discussion I'm left wondering how much we want a version to be able to live on its own. I agree with @ahankinson that having options for a strong notion of version-to-version linking and consistency is good. But perhaps this should be optional to allow clean distribution and sync of immutable versions that stand by themselves until reassembled.

@zimeon
Copy link
Contributor Author

zimeon commented Jul 11, 2018

Discussed in https://github.com/OCFL/spec/wiki/2018.07.11-Editors-Meeting and agreed that there is no need to include previous digests in new inventory files. Closing in favor of #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants