News for hackers. Stuff that matters.
Re:Show HN: ProtoCURL, a curl for Protobuf by ithkuil on Monday February 20, 2023 @06:38AM (#34867199)
nice. A lot of the problems people have with protobuf are down to deficiency in the opensource tooling.

For example, I miss an easy way to stuff all my (and my team's) protobufs in a registry and a tool that autodetects what schema a protobuf is (or leverages the type in Any), so that I can avoid passing complicated path flags to all these tools that decode protos.

Any ideas?

Re:Show HN: ProtoCURL, a curl for Protobuf by joaosoares on Monday February 20, 2023 @07:26AM (#34867462)
Our team has been using Buf (https://buf.build) recently, and they have a nice solution for schema dependency management.
Re:Show HN: ProtoCURL, a curl for Protobuf by dewey on Monday February 20, 2023 @07:30AM (#34867485)
We also switched to Buf. It works really well, and it's nice to have a documented, less obscure wrapper over regular Protobuf commands too. Definitely better than the organically grown Makefiles we had before.
Re:Show HN: ProtoCURL, a curl for Protobuf by avinassh on Monday February 20, 2023 @11:43AM (#34869815)
Could you expand on how buf helps
Re:Show HN: ProtoCURL, a curl for Protobuf by ithkuil on Thursday March 02, 2023 @12:48AM (#34992449)
But has a registry and has a tool to use the regiatry to call grpc

https://buf.build/blog/buf-curl/

Didn't dig deeper to see if the bud tooling can help me deciding protobufs laying around when it's not about a grpc call

Re:Show HN: ProtoCURL, a curl for Protobuf by 86J8oyZv on Monday February 20, 2023 @01:41PM (#34871228)
1) Having worked for a company that did this (after learning that it was an anti-pattern at a previous company)... Putting all Protobuf files in a single "registry"/repo is definitely an anti-pattern. You should put them in the repo that implements the service. That service is responsible for maintaining API compatibility between versions (i.e. keep field numbers "stable" and deprecate/update them so as not to break clients).

(If you want a "registry," the better approach would be to have something that uses all the services as dependencies to consolidate their protos.)

2) Going along with this approach, gRPC has a reflection service; most server implementations can expose this (I have personally done it with Tonic/Rust but I know Golang and Java bindings, probably Ruby and others, support it). If you use something like gRPCurl against a server with reflection, the only "path flags" you have to worry about are, like... just the method names. It can't really get more terse than it is with gRPCurl and gRPC reflection, though autocomplete would be nice to have I guess.