juanfont/headscale

Evaluate ConnectRPC over gRPC + webgateway

Open

#2305 opened on Dec 17, 2024

View on GitHub
 (10 comments) (0 reactions) (0 assignees)Go (38,374 stars) (2,104 forks)batch import
help wantedneeds investigationno-stale-botquestion

Description

We currently use plain gRPC and grpc-gateway (for our http+json) api, it has worked fine, but also there are a couple of drawbacks, and it kind of feels a bit hacky.

One of the drawbacks is that some parts of gRPC is unsupported by grpc-gateway, and it does not support OpenAPI 3.0. oneof is for example not supported https://github.com/juanfont/headscale/issues/2237.

ConnectRPC seem to be a rethinking of this, where the gRPC and the HTTP part is "equally" important. It might be better, it might be worse, they advertise with good client code generators so might be worth a look.

Initial thoughts:

  • Con: This will break current web UIs
  • Pro: they can use a generated client instead of handwriting API
  • Cant see any OpenAPI support, but if their code gen is good, then I dont think that matters
  • "If it aint broke, dont fix it"

I would value peoples views, particularly if you have experience using this.

Contributor guide