Re:Post-REST
by philwelch on Monday November 19, 2018 @04:34PM
(#18489941)
> 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.
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.