| ▲ | morshu9001 5 hours ago | |||||||
Protos are great. Last time I did a small project in NodeJS, I set up a server that defines the entire API in a .proto and serves each endpoint as either proto or json, depending on the content header. Even if the clients want to use json, at least I can define the whole API in proto spec instead of something like Swagger. So my question is, why didn't Google just provide that as a library? The setup wasn't hard but wasn't trivial either, and had several "wrong" ways to set up the proto side. They also bait most people with gRPC, which is its own separate annoying thing that requires HTTP/2, which even Google's own cloud products don't support well (e.g App Engine). P.S. Text proto is also the best static config language. More readable than JSON, less error-prone than YAML, more structure than both. | ||||||||
| ▲ | noctune 4 hours ago | parent | next [-] | |||||||
You might be interested in https://connectrpc.com/. It's basically what you describe, though it's not clear to me how well supported it is. | ||||||||
| ||||||||
| ▲ | c-cube 3 hours ago | parent | prev [-] | |||||||
That's what Twirp (https://github.com/twitchtv/twirp) is about. Protobuf or JSON, over any HTTP, with a simple URL schema. It's fairly simple. | ||||||||