juanfont/headscale

Evaluate ConnectRPC over gRPC + webgateway

クローズ

#2,305 opened on 2024/12/17

 (11 件のコメント) (0 件のリアクション) (0 人の担当者)Go (2,104 件のフォーク)batch import
help wantedneeds investigationno-stale-botquestion

Repository metrics

Stars
 (38,374 個のスター)
PR merge metrics
 (平均マージ 1d 11h) (30d で 33 merged PRs)

説明

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.

コントリビューターガイド