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

Update handling of info.json requests #246

Closed
donaldgray opened this issue Feb 28, 2022 · 2 comments
Closed

Update handling of info.json requests #246

donaldgray opened this issue Feb 28, 2022 · 2 comments

Comments

@donaldgray
Copy link
Member

donaldgray commented Feb 28, 2022

As detailed in Cantaloupe Image-Server RFC we can leverage Cantaloupes ability to fulfil info.json requests.

To date these requests were generated from a template and as such very quick to return.

We still want to handle info.json requests via Orchestrator so investigate best way to do this. Cantaloupe has logic for returning optimal tile sizes so we want to take advantage of this.

Decide:

  • What would be need to store? e.g. tile sizes only? Fully generated info.json?
    • Full info.json should be recorded
  • Where do we store it?
    • not solely in memory, somewhere more permanent. Possibly S3 and just rewrite requests out?
  • When do we generate/store it? (on first request? at ingestion time?)
    • On first request, if it exists return it else generate, store + return.
@donaldgray donaldgray created this issue from a note in Wellcome 2022 (To do) Feb 28, 2022
@donaldgray
Copy link
Member Author

donaldgray commented Mar 1, 2022

Possible duplicate of #238 and #256

@donaldgray donaldgray changed the title Handle info.json requests Update handling of info.json requests Mar 3, 2022
@sarahos sarahos added the WP1 label May 30, 2022
@donaldgray donaldgray moved this from To do to In progress in Wellcome 2022 Jun 9, 2022
@donaldgray
Copy link
Member Author

When info.json is requested the flow is (s3 key contains version, different versions will have different keys):

  • Does this exist in s3? If so read from S3, update "id"/"@id" and return. Else,
  • Does the image-server support requested version? If not abort. Else,
  • Get info.json from image-server. Add authServices (if required).
  • Save updated info.json to S3.
  • Hand back to calling request - will update "id"/"@id" and return

The "id"/"@id" property is updated each time it is returned because we want to avoid needing to save multiple different versions in S3 with specific Ids. The Id can differ if:

  • Canonical image-version is changed
  • Requested via a different hostname (E.g. behind CloudFront).

@donaldgray donaldgray moved this from In progress to Review in Wellcome 2022 Jun 16, 2022
@donaldgray donaldgray self-assigned this Jun 20, 2022
@donaldgray donaldgray moved this from Review to Done in Wellcome 2022 Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants