The proposal document for Linked Artifact Caching specifies using gRPC as the lambda interface. The rationale for this is manyfold:
- The proposal assumes that the cache system provides the canonical/only HTTP API for serving artifacts. This would mean that the Lambda interface is implemented entirely for the purpose of integrating with the cache
- It provides an interface that is clear, concise, and strongly typed
- Support for deadlines and cancellations
- Service schema migrations that are straighforward (forward & backward compatibly)
- Ease of use; You can imagine having (per language) scaffolding projects where you only need to edit some metadata & implement a stub. The scaffold project could be setup to build a container suitable for a standard helm chart
- Given enough adoption, it might make sense (in the future) to implement the Lambdas using FaaS
In short, we get for free what would require considerable work to implement ourselves (and for each new lambda), with a better outcome. This of course rests heavily on the first assumption above, that (for a majority of use-cases) artifacts are served exclusively by the cache service. It would not make sense to require (a majority of) teams to develop a gRPC service in addition to an HTTP one, when the latter could serve both purposes. It also assumes that use of gRPC doesn't otherwise create hardships in our environment. We should put these assumptions to the test.




