nox icon indicating copy to clipboard operation
nox copied to clipboard

Blueprint (and probably module) interfaces have very unintuitive API

Open coder11 opened this issue 4 years ago • 2 comments

Currently

From built-in definitions in aqua:

service Srv("srv"):
-- ...

    -- Retrieves the functional interface of a service running
    -- on the node specified in the service call
    -- Argument: service_id – ID of the service whose interface you want to retrieve.
    get_interface(service_id: string) -> Interface

Which is very counterintuitive because all services are made from blueprints, i.e blueprints, rather than services. define the functional interface

Also there is no API specified for retrieving types and interface declared by the module.

Proposal

  1. Move interface retrieval function from "services" section into "blueprints".
  2. Add API for modules

coder11 avatar Jul 05 '21 17:07 coder11

How do see the modules API?

folex avatar Jul 05 '21 17:07 folex

I think it's better to have 3 different functions:

  1. Get interface of the facade module of a service by service_id. Already implemented as Srv.get_interface
  2. Get interface of the facade module of a blueprint by blueprint_id
  3. Get interface of a module by it's blake3 hash

folex avatar Jul 05 '21 17:07 folex