In the past month, I made my hand dirty on gRPC, and tried to use it in my current project. The effect seems good until now, I want to share some feeling here:
(1) gRPC
lets you concentrate on message definition, and it will generate all necessary code for you. This is really very neat! The APIs are also simple and handy: they help process all kinds of exceptional cases which will save users a lot of energy.
(2) Now gRPC
‘s maximum message length is INT_MAX
(please refer this post) , so on general 64-bit
platform, its value is 2^31 - 1
, nearly 2GiB
. Personally, I think maybe LONG_MAX
, 2^63 - 1
, is better, since it is nearly equal to say there is no limitation for message length. BTW, gRPC
useProtocol Buffers
under the hood. From Protocol Buffers document:
Protocol Buffers are not designed to handle large messages. As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy.
I haven’t dived into Protocol Buffers
code, so not sure what is the negative effect of transmitting large message. But anyway, whether support and whether support well are 2
different things.