Open ml-evs opened 1 year ago
I had a somewhat similar idea when exploring the idea to store OPTIMADE responses or even serve them statically. I was thinking more about file tree layout than single file, but this layer could be handled by tar and similar tools.
My principles were the following:
/structures
-> structures/
)/structures/123
-> structures/123.json
)/info
) endpoint as well/structures
-> structures.json
) alongside the directories with the same nameA very simple server can then be developed to serve these static files.
Just a note that we adopted a very similar format to this in https://github.com/materialscloud-org/optimade-maker, though the OP is slightly out of date.
I can see the benefits of allowing both a single file and a directory structure (suggested above by @merkys). Somehow this could be capture in the top line of the root file, outlining whether the "client" should read the next lines of the file to find data, or look elsewhere in the filesystem.
At the workshop, we discussed a file format specification that would allow an entire OPTIMADE API to be stored in a single file on disk. This would be useful for many applications (archival + restore, data transfer, local tools/exploration, caching etc.). We (@unkcpz, @eimrek, @giovannipizzi) proposed a draft of this file format that is approximately the following:
x-optimade-api-version
with value e.g.,1.2.0
.meta
optimade_example.jsonl:
If there is interest, we will try to write this up as an appendix of the specification.