4 ms·
Why is it bad in server to client?
by wzvici 4y ago
Why is it bad in server to client?
- pphysch 4y agoSetting up TLS in gRPC is annoying if the alternative is using an already-existing HTTPS endpoint.
- anuragsoni 4y agoThat sounds like a problem with GRPC not protobufs.
- boardwaalk 4y agoHow is it annoying? To be fair, we’re fronting our gRPC service with a AWS LB that terminates TLS (so our gRPC is plaintext), so we don’t deal with certs as direct dependencies of our server.
- cmrdporcupine 4y agoBeing able to debug through a simple curl or browser devtools is golden. Also browser has JSON parsing built in. Less dependencies. Easier tooling overall. In my experience people overuse protobuf. But I also worked at Google, where it's the hammer in constant search of any nail it can find. At the very least, endpoints should provide the option to provide a JSON form through content representation negotiation.
- franciscop 4y agoWhen the library decoding the data is falling with weird errors, and you open the devtools in the browser and the data being transmitted is all in binary, well you have a very hard time debugging things. We moved to flatbuffers and back to JSON because in the end of the day, for our data, data compression with JSON+gzip was similarly-sized than the original one (which had some other fields that we were not using) and 10-20 times faster to decode.
- cmrdporcupine 4y agoTruth. That said, the use case for flatbuffers and capnproto isn't really about data size, it's about avoiding unnecessary copies in the processing pipeline. "Zero copy" really does pay dividends where performance is a concern if you write your code the right way. Most people working on typical "web stack" type applications won't hit these concerns. But there are classes of applications where what flatbuffers (and other zerocopy payload formats) offer is important. The difference in computation time between operating on something sitting in L1 cache vs not-in-cache is orders of magnitude. And memory bandwidth is a bottleneck in some applications and on some machines (particularly embedded.)
- clintfred 4y agoNot OP, but I'm going to guess because it's an added dependency in your client library, and even worse, it includes some code generation in each client's build.