HackerTrans
TopNewTrendsCommentsPastAskShowJobs

cobookman

no profile record

comments

cobookman
·8년 전·discuss
> and serialization is often only a few percent of that

A few percent is a huge performance win. For example shaving 5% off the latency of twitter / facebook's apis is huge. Thing about the compute, energy and bottom line impacts.

I do agree for many protobuf is overkill, there's way lower hanging fruit that will give a greater latency reduction.
cobookman
·8년 전·discuss
"""

When using Protobuf on a non-compressed environment, the requests took 78% less time than the JSON requests. This shows that the binary format performed almost 5 times faster than the text format. And, when issuing these requests on a compressed environment, the difference was even bigger. Protobuf performed 6 times faster, taking only 25ms to handle requests that took 150ms on a JSON format.

"""

https://auth0.com/blog/beating-json-performance-with-protobu...
cobookman
·8년 전·discuss
don't forget that gRPC multiplexes requests to various RPCs over an existing HTTP2 connection.
cobookman
·8년 전·discuss
You can have conditional protobuf fields / messages.

Checkout:

- Any: https://developers.google.com/protocol-buffers/docs/proto3#a...

- OneOf: https://developers.google.com/protocol-buffers/docs/proto3#o...

I believe Any is the equivalent to having a proto in format of:

```

message MyMessage {

    string type = 1;

    bytes data = 2;
}

```