Materials-Consortia / OPTIMADE

Specification of a common REST API for access to materials databases
https://optimade.org/specification
Creative Commons Attribution 4.0 International
82 stars 37 forks source link

Reserve sub-namespace for index databases #500

Open rartino opened 6 months ago

rartino commented 6 months ago

We've discussed in the past how it can be a bit inconvenient how to handle the URLs/subdomains one need for the real database and the index meta-db to participate in providers.json. Typically we do something like: https://optimade-index.example.org.

An alternative, which I don't think anyone uses, is to use a place under extensions, i.e., something like this:

https://optimade.example.org/extensions/indexdb

However, it looks a bit confusing, since this is a whole other OPTIMADE endpoint and not an "extension".

So, I want to suggest: would it make sense to completely reserve another URL under the base URL specifically for this use? I.e., something like:

<base url>/indexdb

Which is reserved to allow providers to OPTIONALLY use to host an index database base url. (But, the point being, you are allowed to provide it somewhere else - in some setups it is easier to provide it under its own subdomain; client MUST NOT assume there is an index meta-db there).

ml-evs commented 6 months ago

I really like this idea! Would greatly simplify the case of providing a single API, and optimade-python-tools can serve it from one app and include it when configured (which would avoid the need for some of the netlify providers list providers)