BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News gRPC 1.0 is Ready for Production

gRPC 1.0 is Ready for Production

Leia em Português

This item in japanese

Lire ce contenu en français

Bookmarks

Google has released gRPC 1.0, considering it stable and ready for production.

gRPC started as an internal Google project called Stubby, used for communication by some of their internal services. Google open sourced the framework 18 months ago with the hope that others will embrace it and use it when consuming services from Google, communicating with other services across the internet or for internal products.

gRPC is a platform-neutral RPC system that uses the Protocol Buffers IDL to define end-point services and message payloads to be transferred, then generating stubs for multiple languages. gRPC supports 10 languages - C, C++, C#, Go, Java (including Java/Android), Node.js, Objective-C, PHP, Python, and Ruby – on Linux, Mac and Windows. There are native implementations in C, Go and Java, and wrappers around the C library for the other languages. A performance dashboard was set up by Google to show the latency of various gRPC communications between two VM instances in the same datacenter. For unary synchronous secure messages, the chart shows the base Netperf results at about 100 us, while C++, Java and C# implementations are at about 200-300 us, and Ruby, Python and Node.js are at 700, 900 and respectively 1.100 us.

Messages to be transferred are serialized in a binary format using Protocol Buffers 3.0 which is meant to provide better performance than text formats. Compared to JSON, ProtoBuf can cut the size of a message in half and use a third of the time to serialize/deserialize it, according to Kelsey Hightower, a Google engineer.

Beside unary RPCs which consist of one request followed by one response, gRPC makes use of HTTP/2 to provide uni or bi-directional streaming between client and server. Communication can be synchronous or asynchronous and supports authentication via SSL/TLS or OAuth2 (with Google APIs).

The installation process has been simplified by providing gRPC binaries via CocoaPods, gem, Gradle, Maven, npm, NuGet, pecl, pip, or Docker images.

A number of companies, including Cisco, CoreOS, Juniper, Netflix and Square, are using gRPC internally, according to Google.

Rate this Article

Adoption
Style

BT