What’s in This Book

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

The Pragmatic Programmers
The Pragmatic Programmers
3 min readApr 23, 2021

--

👈 Who This Book Is For | TOC | Online Resources 👉

We will design, develop, and deploy a distributed service to explore what Go can do. We’ll develop and deploy the service in layers: from the bare essentials of storage handling, to the networking of a client and server, to distributing server instances, deployment, and testing. I divided this book into four parts that parallel those layers. (Don’t worry if you aren’t familiar with the technologies I mention next — I explain them in the relevant chapters.)

Part I — Get Started

We’ll begin with the basic elements: building our project’s storage layer and defining its data structures.

In Chapter 1, Let’s Go, we’ll kick off our project by building a simple JSON over HTTP commit log service.

In Chapter 2, Structure Data with Protocol Buffers, we’ll set up our protobufs, generate our data structures, and set up automation to quickly generate our code as we make changes.

In Chapter 3, Write a Log Package, we’ll build a commit log library that’ll serve as the heart of our service, storing and looking up data.

Part II — Network

This part is where we’ll make our service work over a network.

In Chapter 4, Serve Requests with gRPC, we’ll set up gRPC, define our server and client APIs in protobuf, and build our client and server.

In Chapter 5, Secure Your Services, we’ll make our connections secure by authenticating our server with SSL/TLS to encrypt data exchanged between client and server and by authenticating requests with access tokens.

In Chapter 6, Observe Your Systems, we’ll make our service observable by adding logs, metrics, and tracing.

Part III — Distribute

In this part we’ll make our service distributed — highly available, resilient, and scalable.

In Chapter 7, Server-to-Server Service Discovery, we’ll build discovery into our service to make server instances aware of each other.

In Chapter 8, Coordinate Your Services with Consensus, we’ll add consensus to coordinate the efforts of our servers and turn them into a cluster.

In Chapter 9, Discover Servers and Load Balance from the Client, we’ll code discovery in our gRPC clients so they discover and connect to the servers with client-side load balancing.

Part IV — Deploy

Here’s where we’ll deploy our service and make it live.

In Chapter 10, Deploy Applications with Kubernetes Locally, we’ll set up Kubernetes locally and run a cluster on your local machine. And we’ll prepare to deploy to the cloud.

In Chapter 11, Deploy Applications with Kubernetes to the Cloud, we’ll create a Kubernetes cluster on Google Cloud’s Kubernetes Engine and deploy our service to the cloud so that people on the Internet can use it.

If you plan on building the project as you read (which is a great idea), read the parts in order so that your code works. It’s also fine to skip around in the book as well; the ideas we’ll explore in each chapter have value on their own.

👈 Who This Book Is For | TOC | Online Resources 👉

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.

Unlisted

--

--

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.