3 ms·
>Afraid I'm going to be contrary and old-fashioned and say I prefer JSON. history is completing full circle. Before JSON (HTTP REST) there was RPC. JSON was a
by trhway 9y ago
>Afraid I'm going to be contrary and old-fashioned and say I prefer JSON.
history is completing full circle. Before JSON (HTTP REST) there was RPC. JSON was a new and shiny thing while the RPC was for the old-fashioned. The JSON took over exactly for all the great advantages over RPC that you listed (and a bunch of others) and despite all the advantages of RPC that people in this thread tout today as the gRPC advantages. I suspect that in 10-15 years some young guys at Google will come up with gJSON, and their arguments for it will look like your comment today.
- baby 9y agoit's a performance point of view. You will never beat a binary format to transfer data over the wire. Sure it's not as debugable, but if you want speed you don't have much choice. HTTP/2 did the same thing and ditched the textual format of HTTP/1.
- puzzle 9y agoEven with a binary format, you have a lot of options. gRPC has plans for binary logging, which Stubby has had for a decade or more. Google's Stubby clients and servers also have built-in HTTP handlers that let you do a lot of interactive debugging, like the /debug/requests interface in golang's net/trace package. Unexpectedly, I found that a much better troubleshooting experience than pouring through logs (also because logs don't capture everything).
- baby 9y agoNot really. If you need to support multiple platforms and you need something secure (no DER or BER or...) then protobuf is pretty much unbeatable. Well-maintained Libraries in every language and good generated code based on a simple format.
- puzzle 9y agoUh, no. If anything, they are switching more workloads to Flatbuffers. Google does a lot of fleet-wide profiling and the encoding and decoding of protocol buffers, which were meant to be efficient, is NOT lost in the noise. Groups like the toolchain teams have a good idea of how many orders of magnitudes in cores are spent doing just that every second. Something like JSON would require probably tens or hundreds of millions of dollars in additional machines for no gain (slightly educated, but still wild guess).
- rb808 9y agoThanks, actually Flatbuffers looks very useful.