Goals When Building a Service

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

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 What Is gRPC? | TOC | Define a gRPC Service 👉

Here are the most important goals to aim for when you’re building a networked service — and some info about how gRPC helps you achieve them:

Simplicity
Networked communication is technical and complex. When building our service, we want to focus on the problem it solves rather than the technical minutiae of request-response serialization, and so on. You want to work with APIs that abstract these details away. However, when you need to work at lower levels of abstraction, then you need those levels to be accessible.
On the spectrum of low- to high-level frameworks, in terms of the abstractions you’re working with, gRPC is mid-to-high level. It’s above a framework like Express since gRPC decides how to serialize and structure your endpoints and provides features like bidirectional streaming, but below a framework like Rails since Rails handles everything from handling requests to storing your data and structuring your application. gRPC is extendable via middleware, and its active community[15] has written middleware[16] to solve a lot of the problems you’ll face when building services — for example, logging, authentication, rate limiting, and tracing.

Maintainability
Writing the first version of a service is a brief period of the total time you’ll spend working on the service. Once your…

--

--

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.