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

Add administrative API #15

Open
jechols opened this issue Oct 31, 2018 · 3 comments
Open

Add administrative API #15

jechols opened this issue Oct 31, 2018 · 3 comments

Comments

@jechols
Copy link
Member

jechols commented Oct 31, 2018

Add functions that can be called via HTTP requests:

  • Purge in-memory cache. This shouldn't affect enough of the app to worry about granularity, at least not with the current setup. It should just clear both the info and tile caches.
  • Purge caches for a given identifier. This would take some doing, and right now isn't possible (the tile cache is cached by the IIIF request, and nothing indexes all cached tiles by identifier). Eventually, though, it could be that we have multiple caches from different sources: info cache, tile cache, S3 download cache, tiles cached on disk, etc. All caches should get a signal when a given IIIF ID needs its cache purged.
  • Health / liveness probes? RAIS is simple enough that if the service is running, it is almost guaranteed to be both healthy and live. But these may be worth considering.

The admin API could listen on a separate address pretty easily so it could easily be exposed just to internal users.

@jechols
Copy link
Member Author

jechols commented Nov 1, 2018

Another idea: an info query. This could show what plugins were loaded, which functions each exposed, cache statistics, the version of RAIS, etc.

@jechols
Copy link
Member Author

jechols commented Nov 5, 2018

Basic admin API infrastructure now works and exposes a simple stats JSON endpoint

@jechols
Copy link
Member Author

jechols commented Nov 14, 2018

Info and tile caches have expiration endpoints. Plugins, however have no way to know when a cache expiration is requested, so there's still more work to do here than I realized.

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

No branches or pull requests

1 participant