nox
nox copied to clipboard
Blueprint (and probably module) interfaces have very unintuitive API
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
- Move interface retrieval function from "services" section into "blueprints".
- Add API for modules
How do see the modules API?
I think it's better to have 3 different functions:
- Get interface of the facade module of a service by
service_id. Already implemented asSrv.get_interface - Get interface of the facade module of a blueprint by
blueprint_id - Get interface of a module by it's blake3 hash