4 ms·
We migrated many of our critical protocols from JSON to protobuf, and the experience has been very positive. As your system gets bigger, and your teams get bigg
by zeroxfe 4y ago
We migrated many of our critical protocols from JSON to protobuf, and the experience has been very positive. As your system gets bigger, and your teams get bigger, the value of a typed schema has a multiplicative effect on both reliability and productivity. In addition, a lot of basic features around managing transport, like load balancing, health checking, deadlines, etc. come out of the box.
IMO, performance is the least of the reasons to use protobufs. And if you're working on simple systems in small teams (or solo), then JSON is a better fit (because it's simpler to understand, debug, and iterate with.) gRPC is definitely not a one-size-fits-all.
- nwah1 4y agoSwagger/OpenAPI offers a typed API in JSON (along with generated clients just like gRPC). The complaints about protobuf as a serialization format remain valid, and you don't need it to have types. Also the reability of JSON in-transit is another factor to consider.
- dataflow 4y agoI think the parent comment was talking about the benefits of the protobuf serialization format, not the benefits of the protobuf schema.
- fizwidget 4y agoYou can get the benefits of a typed schema with GraphQL, while still using JSON under the hood.
- deepstack 4y ago>As your system gets bigger, and your teams get bigger, the value of a typed schema has a multiplicative effect on both reliability and productivity. I often see this in arguments using in TypeScript vs plain JS debate. Is this really true in practice? Be good to get some more examples on this.
- JohnHaugeland 4y agoIt's extremely well documented
- bobbylarrybobby 4y agoDo you really need a typed schema for transmission if you have types on the serialization and deserialization ends? I'm thinking of something like Rust's serde that derives (de)serialization logic just from the type, so it can't serialize bad data and won't deserialize bad data.