-
Notifications
You must be signed in to change notification settings - Fork 12
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
extension manifest #34
Comments
Separate from the substance of this issue, I think we should not consider calling anything other than the |
awoods
pushed a commit
to awoods/extensions
that referenced
this issue
Nov 5, 2020
awoods
pushed a commit
to awoods/extensions
that referenced
this issue
Nov 5, 2020
rosy1280
pushed a commit
that referenced
this issue
Nov 17, 2020
* Add 'Optional Extension Initializer' Resolves: #34 * code review * typo * code review * code review * code review Co-authored-by: Andrew Woods <awoods@duraspace.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In PR #31 I proposed the idea of having a JSON file that lists the extensions that are used on an object or a storage root. I am creating this ticket for further discussing the idea. Later in the PR, I described an alternative approach where this manifest file also serves to store extension configuration instead of each extension having its own configuration file.
I proposed that this file live at
extensions/extensions.json
in the storage root and object extension directories. This knowingly contradicts existing language in the OCFL spec that forbids files under theextensions
directory. If this considered immutable, a workaround could be to stick the manifest in a subdirectory.When thinking about how OCFL extensions should work, there are some key questions:
Not all of those questions are necessarily relevant to whether or not there is an extension manifest/registry file, but I was on a roll writing them.
I think we could devise a reasonable system with or without the file, but, to me, it is much cleaner with the file. For example, let's say that we don't have a manifest and we want to keep old extension configuration. With those requirements, you could create
extensions/enabled
andextensions/historic
(or whatever) directories. In the first, every extension that the object/storage root uses MUST have a directory named for its registered name that, at the minimum, MUST contain a configuration JSON file. This is true even if the extension has no parameters. Clients process the contents of this directory when an object/storage root is accessed, loading extensions by directory name.The other directory is used to store old extension configuration in the same format as the contents of
extensions/enabled
. The only difference is that you'd have to come up with a scheme to dedup the directory names, timestamp or something, to account for the possibility that the directory may need to contain multiple different entries for the same extension.It works, but, to me, the whole thing works more smoothly when there is a manifest. I think this is particularly true when it comes to extensions that are not parameterized (or are only using default parameters) and supporting object stores. Yes, I can fake an
ls
in S3 to extract the names of the extensions I need to load, but it's a heck of a lot more inconvenient than just downloading a file that tells me exactly what I need to know.As mentioned earlier, the manifest approach could be implemented in a way that is more similar to the original directory based approach, or it could be taken a step further and encapsulate all of an object's (or storage root's) extension configuration. Instead of each extension having its own configuration file, there would only ever be at most one unified configuration file per object/storage root. There's an example of this here.
Personally, I find this single configuration file approach the easiest of the three to work with. But, I am curious how others weigh the pros and cons of each approach (and if there are any other ideas), and if there is a consensus on what is the best path forward.
The text was updated successfully, but these errors were encountered: