This topic is about the organization of the package SDK and its consequences on the package service/grpc.
I would like to propose the following rules:
- helper init dependencies function
- initialize sub-package in New
- only expose publicly sub-package instance
SDK sub-packages (eg: sdk/execution)
- initialized by SDK with all dependencies
- should read / write to only one specific data
- should call function from other sub-packages if need to read / write from other data
- dependency between sub-packages should respect the way the data are (eg: instance dependent on service, so sub-package instance can dependant on package service, but not the other way)
- only dependant on SDK
- each api should call one write function of a SDK sub-package
- each api can call multiple read functions from SDK sub-packages for error verification (eg: check that instances doesn’t exist before deleting a service)
- if an api need to call multiple write functions from SDK, a new SDK sub-package should be created to handle it.
@core what do you think?