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

concurrency/locking #28

Open
bcail opened this issue Aug 5, 2020 · 1 comment
Open

concurrency/locking #28

bcail opened this issue Aug 5, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@bcail
Copy link
Contributor

bcail commented Aug 5, 2020

Is there any support for protecting objects from conflicting concurrent requests in this package? Or is any planned?

@zimeon
Copy link
Owner

zimeon commented Aug 5, 2020

Certainly nothing in the code yet. I'd be interested in talking about this as a possibility. Perhaps a connector to a lock service that could have some simple default implementation (maybe using unix directory creation which would obviously only work for clients using the same lock filesystem). I can imagine a first stab for be object-level locks/checks could be:

  • write lock - get a lock for an object (based on storage root plus object id, or full path/URL if object not in a storage root)
  • update procedure - think about changes to object and version writes to account for locking per https://ocfl.io/1.0/implementation-notes/#an-example-approach-to-updating-ocfl-object-versions
  • read checks:
    • blocking writes - check/get same lock as for write
    • non-blocking write: assumes good update procedure, read root inventory, check version directories (extra version directory indicates write in progress which might then not be an error)

@zimeon zimeon added the enhancement New feature or request label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants