What Is gRPC?

Distributed Services with Go — by Travis Jeffery (30 / 84)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Chapter 4 Serve Requests with gRPC | TOC | Goals When Building a Service 👉

When I was building distributed services in the past, the two common problems that drove me batty were maintaining compatibility and maintaining performance between clients and the server.

I wanted to ensure that clients and the server were always compatible — that the client was sending requests that the server understood, and vice versa with the server’s responses. When I made breaking changes to the server, I wanted to ensure that old clients continued to work, and I accomplished this by versioning my API.

For maintaining good performance, your main priorities are optimizing your database queries and optimizing the algorithms you’ve used to implement your business logic. Once you’ve optimized those though, performance will often come down to how fast your service unmarshals requests and marshals responses, and down to reducing the overhead each time clients and the server communicate — like using a single, long-lasting connection rather than a new connection for each request.

So I was happy when Google released gRPC, an open source, high-performance RPC (remote procedure call) framework. gRPC has been a great help in solving these problems when building distributed systems, and I think you’ll find that it simplifies your work. How does gRPC help you build services?

👈 Chapter 4 Serve Requests with gRPC | TOC | Goals When Building a Service 👉

Distributed Services with Go by Travis Jeffery can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.