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

WIP: Extensions #404

Closed
wants to merge 2 commits into from
Closed

WIP: Extensions #404

wants to merge 2 commits into from

Conversation

ahankinson
Copy link
Contributor

A "commit early, commit often" take on the wording for the extensions directory. Still todo:

  • Add general 'extensions' description (top-level section?) to which we can refer as a general description of extensions and their mechanics.
  • Review requirements for extensions in Object root
  • Add language about storing plain text descriptions of the extension in the object root

Add any missing things you see to the list.

Copy link
Member

@awoods awoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good... pending finalization of the name of the extensions directory.

Copy link
Contributor

@rosy1280 rosy1280 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions and clarification because its a work in progress!

The base directory of an OCFL Object MAY contain a directory named <code>extensions</code> for the purposes
of extending the functionality of an OCFL Object. Sub-directories of the extensions directory MUST be named
according to a registered extension name. OCFL Validators MUST ignore any content in extensions that are
not understood. The specific structure and function of the extension, as well as a declaration of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not understood

that's a little unclear. we should be a bit more specific. i'm assuming you mean by a validator that understands the spec and/or that can validate whatever the extension asks it to validate.

Copy link
Contributor Author

@ahankinson ahankinson Nov 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the language from the existing §4.4, "An OCFL validator must ignore any files in the storage root it does not understand."

We also have (in §3.4): "Optional fixity algorithms that are not supported by a client must be ignored by that client."

So would something like

Extension directories that are not supported by a client MUST be ignored by that client

make sense? Should we narrow it down specifically to validation, or just leave it open generally to "clients"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be "clients" and agree with last wording suggestion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think stick with validators - this is the spec for objects at rest. We can discuss clients in the Implementation Notes (Client Behaviour's section) - ignoring extentions when writing is dangerous.

@@ -953,7 +963,7 @@ <h2>Storage Hierarchies</h2>
</section>

<section id="root-extensions">
<h2>Extensions</h2>
<h2>Root Extensions</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it sound like their is a difference between extensions that appear in the storage root and the object root. I thought we had agreed that Extensions would be stored at the root and then used in the objects -- but you might not use all extensions listed in the storage root.

Copy link
Contributor Author

@ahankinson ahankinson Nov 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are extensions, like the “layout” functionality, that will be root-only. (The demo from @birkland) In this case it does not affect the contents of objects, but only the paths to them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change title to "Storage Root Extensions"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... which still leave the question of where descriptions of object extensions go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Descriptions of object extensions also go in the storage root as a plain text file, on the theory that it is a single place that can describe the structure of some or all objects in that storage root.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @ahankinson


<section id="extensions">
<h2>Extensions directory</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capital D in directory to match section title style

<h2>Extensions directory</h2>
<p>
The base directory of an OCFL Object MAY contain a directory named <code>extensions</code> for the purposes
of extending the functionality of an OCFL Object. Sub-directories of the extensions directory MUST be named
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Here we do not make it illegal to have files in the extension directory, I think that is the intention
  • I would also say the sub-directories SHOULD be named according to a registered name rather then MUST

Copy link
Contributor Author

@ahankinson ahankinson Nov 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point 2: SHOULD would leave open the possibility of multiple things implementing the same extension but with different local names. This would make it difficult for clients to understand that it can operate on that content.

The alternative would be to use a NamAsTe file to declare an extension's identity in the root directory of that extension, e.g., extensions/versioning/0=mutable_head-1.0, which would allow us to name things differently. But this was an unpopular suggestion on the editorial call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't the directories under extensions a namespace that references OCFL extentions - in that case, there should only be a single instance of any one type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern is that by making it a SHOULD we leave open the possibility that people name their directories in extensions in a way that diverges from the name that is registered by the extension.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahankinson I'm agreeing with you!

of extending the functionality of an OCFL Object. Sub-directories of the extensions directory MUST be named
according to a registered extension name. OCFL Validators MUST ignore any content in extensions that are
not understood. The specific structure and function of the extension, as well as a declaration of the
registered extension name MUST be defined in the OCFL Extensions Registry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go for SHOULD instead of MUST again, I'd also put any such language next to the sentence about the name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOULD would leave open the possibility of registered and unregistered namespace collisions -- two extensions with the same name but different functions. By making it a MUST we reduce this possibility.

@awoods
Copy link
Member

awoods commented Mar 3, 2020

Superseded by: #428

@awoods awoods closed this Mar 3, 2020
@rosy1280 rosy1280 deleted the fixed-403-extensions branch July 20, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants