Open alexbrdn opened 7 months ago
To document some points from our discussion this morning:
fetch
to create a file with the same directory layout as within the catalog being fetched from. Leave the output to stdout as the default. (accepted)tm-catalog-cli remote set-auth
to make credential setup easier. (accepted)@hadjian, restricting list, versions, and fetch commands to just one remote is already implemented
[Description]
One of the requirements for Thing Model Catalog (TMC) is to enable using multiple and different remote repositories (remotes) for storing Thing Models, e.g. public vs private, file system vs Amazon S3 storage. This proposal describes envisioned workflows for working with remotes and necessary functionality on the part of TMC.
The TMC should support at least the following workflows. The list is not exhaustive.
[How]
The TMC should have a CLI command to manage remotes. This command should support CRUD operations on the list of remotes and store it in the config file. Parts of configuration (e.g. authentication secrets) may be left out of the config file and instead be derived from environment variables.
The following kinds of remotes are envisioned and can be implemented in due time:
The commands (APIs) that TMC provides through its CLI or REST API can be divided into three groups by their relation to remotes:
validate
push
list
,versions
,fetch
The implementation of the third kind of commands - federated actions - should be extended to support multiple remotes. Of special interest is the
list
command, which should perform a federated search across all remotes. For such search to work, each kind of remote should ether implement some kind of search API, which returns structured results (with rankings), or host a predefined search index at a known place. The rankings are necessary to smartly merge search results. A tm-catalog instance or cloud bulk storage will have their own search apis. A file remote or a plain http server serving a file directory, on the other hand, must include a search index.cc => @hadjian @EVO-Antoniazzi