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

Don't generate info.json from template #238

Closed
tomcrane opened this issue Jan 14, 2022 · 1 comment
Closed

Don't generate info.json from template #238

tomcrane opened this issue Jan 14, 2022 · 1 comment
Labels

Comments

@tomcrane
Copy link
Contributor

At the moment, Orchestrator generates the info.json request from a template, and then adds in additional information - like the sizes array, and auth services.

This approach is OK because the underlying IIPImage always generates the same info.json anyway - e.g. it always specifies 256x256 tiles.

This tile size is not necessarily the optimum, and other image servers might generate other tiles properties that depend on the particular properties of the image.

If we replace IIP with Cantaloupe, we should let Cantaloupe generate the info.json, and then decorate it with our additional info (like thumb sizes and auth services).

However, we can still optimise - we could store the image-server-generated info.json in S3 or the DB, either as-is or just the necessary data. While we can still use the request for an info.json as a trigger for orchestration*, we don't have to orchestrate to fulfil a request for an info.json - we can return our cached version while we orchestrate.

--

*With more and more optimisation to avoid orchestration, we need to think about whether an orchestration is triggered by an info.json request, or by analysing the actual image request to see if it really needs the orchestrated image. For example, if a client asks for the info.json and then makes a /full/full/ request, and we have #30, then we don't need to orchestrate. The trouble is we don't know whether that info.json request will be followed by a flood of tiles (in which case, orchestration-on-info.json is a valuable optimisation) or a request we can fulfill other ways (in which case, we wasted the orchestration).

Harvesting of info.jsons by an external crawler would also lead to unwanted orchestration.

@tomcrane
Copy link
Contributor Author

Superseded by #246

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

No branches or pull requests

2 participants