wot-oss / proposal

Eclipse Public License 2.0
5 stars 0 forks source link

proposal: thing-model-catalog: Working With Multiple Thing Model Repositories #13

Open alexbrdn opened 7 months ago

alexbrdn commented 7 months ago

[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:

  1. Doesn't need a remote. E.g. validate
  2. Requires exactly one remote. E.g. push
  3. Performs a federated action on all remotes, but may be limited to just one. E.g. 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

hadjian commented 6 months ago

To document some points from our discussion this morning:

alexbrdn commented 6 months ago

@hadjian, restricting list, versions, and fetch commands to just one remote is already implemented