gRPC

by Keith Elder


Keith Elder is the Senior Technology Evangelist on the Quicken Loans Emerging Technology team. This team looks to the future to see how new technologies can impact the business.

grpc

What is it?

gRPC is a modern open source high performance remote procedure call (RPC) framework that can run in any environment. It enables client and server applications to communicate transparently, and makes it easy to build connected systems. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication.

gRPC uses protobuf, a language-neutral, platform-neutral, extensible mechanism for serializing structured data. For clients and servers to communicate, a service contract is defined within a .proto file. This file defines all of the methods and models that will be exchanged between the client and the server. Once the .proto file is defined, client and server stub code for 10 languages can be generated using the protoc executable. This helps to efficiently connect polyglot services and removes the burden of hand writing client libraries. Client to server interaction is transported over HTTP/2 supporting bi-directional streaming in binary form making gRPC highly efficient on the wire and able to support more scenarios for application development than typical REST services.

Pros & Cons List

Pros:

  • Speeds up development time by generating client and server stub from .proto file (contract).
  • More performant because it is using a machine to machine paradigm rather than human readable text.

Cons:

  • Not all languages have the same default values for specific types.
  • Browsers do not support HTTP/2. In order to support front-end web clients, a proxy must be used to convert
  • gRPC calls to REST. See this for more details.

Quicken Readiness Graph

Readiness Scale

ValueReadiness
0Not ready at all
1Significant work will need to be done for this to be adopted. There are still many unknowns.
2Minor work will need to be done for this to be adopted. The are few unknowns.
3We are all in and ready now. There are very few unknowns.
Area of ReadinessOur Rating
Regulatory3
Technology Maturity3
Industry Readiness3
Client Readiness3
QL Readiness2

Outlook

Many technology companies have tried with mixed results to replace web service calls with binary equivalents in order for performance gain. One such company is Google who created Protobuf internally in 2001 and released it as open source in 2008. Google has been using a single general-purpose RPC infrastructure called Stubby to connect the large number of microservices running within and across their data centers for over a decade. Their internal systems have long embraced the microservice architecture gaining popularity today. Stubby was used to power all of Google’s microservices interconnect for over a decade and was the RPC backbone behind every Google service that is used today. In March 2015, they decided to build the next version of Stubby in the open so they could share their learnings with the industry and collaborate to build the next version of Stubby both for microservices inside and outside Google but also for last mile of computing (mobile, web and IOT), thus gRPC was born.

Today, companies like Netflix, Lyft, Square, Cisco, Uber, and Apple have embraced gRPC as their defacto standard for building services. In the financial industry, our competition has already started to use gRPC as evidenced by usage in their open source offerings. Today, Protobuf has been downloaded over 6.8 million times on nuget.org and gRPC has over 1 million downloads just for .NET development alone.

Overall, the outlook for gRPC is positive and gaining more and more traction as evident by the recent announcement of Microsoft to incorporate first class tooling for .NET developers in Visual Studio.

Conclusion & Recommendation - ADOPT

gRPC should be used for communication between microservices, point to point real-time communication, and network constrained environments.

Since gRPC adoption has a major impact on how software is written within the enterprise, the adoption of gRPC should be started through the current RFC process.