Write a RFC (request for comment) document describing our proposed design for gRPC transport.
Acceptance criteria
The document should describe the intended gRPC implementation from the point of view of app developers (people building applications using gRPC transport), extension developers (people that want to contribute e.g. custom authorization/authentication sequence action for gRPC) and core developers (people contributing changes to loopback-next and the gRPC extension).
- Supported flavors of service method handlers - Controller methods vs. handler functions
- API-first (top-down) vs. code-first (bottom-up) approach, how to provide protobuf metadata - think of
@api and @get decorators for REST
- Sequence contract, what are the built-in (default) sequence actions and what is their API
- How to handle different flavours of gRPC methods (unary call, server streaming, client streaming, bidirectional streaming), especially in respect to Sequence API
- How to avoid duplication of message definitions between
.proto and .ts files and keep a single source of truth
- How can controller methods/handler functions access additional request metadata and provide additional response metadata (trailer)?
- Static loading of proto specs, dynamic loading or both? What is our reasoning for this decision?
- How to control which transports/servers are started by
app.start
Additional information
Write a RFC (request for comment) document describing our proposed design for gRPC transport.
Acceptance criteria
The document should describe the intended gRPC implementation from the point of view of app developers (people building applications using gRPC transport), extension developers (people that want to contribute e.g. custom authorization/authentication sequence action for gRPC) and core developers (people contributing changes to loopback-next and the gRPC extension).
@apiand@getdecorators for REST.protoand.tsfiles and keep a single source of truthapp.startAdditional information
coreto a standalone package needs to address some of the challenges faced by gRPC too, we should stay consistent: Migrate rest functionality from core #576