Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
https://docs.go-blueprint.dev/
MIT License
5.88k stars 333 forks source link

[Feature Request] Implement Protocol Buffers Template #215

Open H0llyW00dzZ opened 8 months ago

H0llyW00dzZ commented 8 months ago

Tell us about your feature request

Implement a protocol buffers template for advance only

Disclaimer

Ujstor commented 8 months ago

We would like to see gRPC implemented as an advanced feature. There was a ticket in the early days, but it was never delivered #31

Twirp is good choice https://github.com/twitchtv/twirp

H0llyW00dzZ commented 7 months ago

We would like to see gRPC implemented as an advanced feature. There was a ticket in the early days, but it was never delivered #31

Twirp is good choice https://github.com/twitchtv/twirp

@Ujstor I also have an example for Proto:

https://github.com/h0llyW00dzZ/ProtoHTTP

It uses the packages google/api/annotations.proto and google/rpc/status.proto, which are enough to create REST APIs.

H0llyW00dzZ commented 7 months ago

Also, note that Protocol Buffers have a limitation that I am still figuring out. For example:

{
  "latencyMicroseconds": "101579",
  "formattedLatency": "101579 µs",
  "formattedLatencyMilliseconds": "101.58 ms"
}

The latencyMicroseconds, formattedLatency, and formattedLatencyMilliseconds cannot be customized by changing them into:

{
  "latency_microseconds": "101579",
  "formatted_latency": "101579 µs",
  "formatted_latency_milliseconds": "101.58 ms"
}

because it seems to be automatic or dynamic.

Ujstor commented 7 months ago

@H0llyW00dzZ , I have never used gRPC and don't know enough to make this decision. @Melkeydev is the best person to ask how he envisions implementing it within the advanced flag.

H0llyW00dzZ commented 7 months ago

@H0llyW00dzZ , I have never used gRPC and don't know enough to make this decision. @Melkeydev is the best person to ask how he envisions implementing it within the advanced flag.

@Ujstor, it's pretty useful for large applications, and highly performant and scalable. I can understand why Google uses protocol buffers for gRPC.