3 ms·
> Is it using protocol buffers? Do you care? I don't, but other people do. For anything low latency, the cost of encoding/decoding starts to become extremely
by denormalfloat 8y ago
> Is it using protocol buffers? Do you care?
I don't, but other people do. For anything low latency, the cost of encoding/decoding starts to become extremely difficult to avoid.
But that said, I'm pretty sure GRPC can use JSON internally, so it's up to you which encoding to use.
- philwelch 8y ago> For anything low latency, the cost of encoding/decoding starts to become extremely difficult to avoid. Whether this is an argument against JSON and in favor of Protobuf or vice-versa depends on which language you're operating in. Most benchmarks I've seen show that Protobuf is faster to encode and decode for Java and Golang while JSON is faster for Python and Javascript. IMO, if you're worried about low latency, you're also likely using a compiled language where Protobuf will be faster anyway.
- AceJohnny2 8y ago> For anything low latency, the cost of encoding/decoding starts to become extremely difficult to avoid. Consider this: At the scale Google operates, fractions of a % of improvement are worth doing for saving the company (tens/hundreds/more) thousands of dollars in CPU/energy/anything, and they have the people to throw at the problem. Does an alternative solution really improve any/all of throughput/latency/reliability?