Building distributed systems can be extremely complex, but it doesn’t have to be. gRPC was created as a high performance RPC framework that makes it easy for to build client/server applications. Using protocol buffers, you can define both data messages and procedure calls that turn into easy to consume structures and services in Go.
Students will learn how to define Protocol Buffers, as well as how to properly modify them for future revisions to be backwards compatible. They will also learn how to define and consume simple requests via RPC (known as unary calls), as well as more advanced client, server, and bi-directional streaming services. Finally, the students will learn how to create the boilerplate client and server applications, as well as how to create middleware, secure their services, and if time permits, to monitor and track their rpc calls across their distributed application structure.
A basic understanding of the Go programming language. Beginners are highly encouraged to attend this training. While not necessary, it will be helpful if you have completed the Go tour (https://tour.golang.org).
Tim Raymond is a full-stack developer with over six years of experience writing Go for companies such as USA Today, InfluxData, and Mattel. He's worked on everything from publishing pipelines, gRPC APIs, IoT backends, and interactive React frontends powered by Go backends. Prior to his involvement in the Go community, Tim served as an organizer for the Boston Ruby Group. His professional interests range across web applications, compilers, networking, performance, and cryptography.
This module covers general information about your instructor and course materials.
This chapter covers general environment setup and other resource related
information needed to complete the courses contained within.
Installing all the tools you need to make protocol buffers work can be
challenging. This chapter lays out in detail the steps needed to properly
install and configure your development environment for protocol buffers. It
also includes specific steps for each operating system when necessary.
Protocol Buffers are the next step in data formats for high performance distributed
systems. In comparison to JSON or XML, protobufs can encode and decode faster, have
a smaller encoded size, and allow for use across platforms and languages.
In this chapter, we will cover how to create and use protocol buffers, as well
as how to extend them.
Throughout this chapter, the code samples may reference the plugin as gofast_out or go_out.
They can be used interchangeably based on what flavor of protobuf you decided to use.
gRPC is a modern open source high performance RPC framework that can run in any
environment. In this chapter we will cover the basic concepts used in gRPC, as
well as create some simple RPC calls using protocol buffers and implement them
with gRPC. We'll also cover how to create specific errors and codes with gRPC.
Streaming in gRPC allows for the client or server to send and receive more than one message. This
allows for asynchronous processing and bi-directional communication. This module will
cover client streaming, server streaming, and bi-directional streaming.
Similar to how HTTP protocol can send headers, gRPC allows you to
send key/value pairs via metadata. This module shows how to set
and retrieve metadata, and guidelines around when to use it.
Service Level Agreements (SLA's) are an important part of your API. This
chapter will discuss how to implement them on the client and server, and best
practices to follow.
gRPC provides a simple authentication API based around the unified concept of
Credentials objects, which can be used when creating an entire gRPC channel or
an individual call.
Credentials can be of two types:
This chapter will cover how to secure a channel and how to secure a call.
This chapter will show how to approach testing for both client and server
services. We will also cover how to mock out specific parts of the stack to
enable easy unit testing.
Middleware is a common way to handle many concepts such as logging, tracing,
and more. You can implement middleware in your gRPC stack with "interceptors".
This chapter will show how to create basic interceptors and cover existing
third party interceptors, as well as setting up basic health checks, retry
logic, and load balancing.
This module will cover how to enable tracing across your distributed gRPC
stack, as well as cover popular concepts such as OpenTrace and OpenCensus.
This chapter covers where to get more support on Go, recommends books and
videos, and list the contact information for our instructors.