juanfont/headscale

Evaluate ConnectRPC over gRPC + webgateway

Open

#2,305 创建于 2024年12月17日

在 GitHub 查看
 (10 评论) (0 反应) (0 负责人)Go (2,104 fork)batch import
help wantedneeds investigationno-stale-botquestion

仓库指标

Star
 (38,374 star)
PR 合并指标
 (平均合并 4天 10小时) (30 天内合并 27 个 PR)

描述

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.

贡献者指南