juanfont/headscale

Evaluate ConnectRPC over gRPC + webgateway

已关闭

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

 (11 条评论) (0 个反应) (0 位负责人)Go (2,104 个派生)batch import
help wantedneeds investigationno-stale-botquestion

仓库指标

星标
 (38,374 个星标)
PR 合并指标
 (平均合并 1天 11小时) (30 天内合并 33 个 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.

贡献者指南