Hands-On Go : Microservices With Protocol Buffers & gRPC

Protocol buffers (protobuf) & gRPC implementation using Go programming language (Golang) on microservice architecture

  • 0.0 (0 Reviews)
  • 0 Students
  • 200 Lessons
  • Timotius P

Course Overview

This course is designed to help learners understand and implement Protocol Buffers (protobuf) and gRPC using the Go programming language on microservice architecture.

The course is structured in a step-by-step manner, starting with an introduction to protobuf, its style guide, and course file structure. You will learn the theory behind various aspects of protobuf such as scalar types, repeated enum comments, protobuf JSON, nested message type, package, any, oneof, map, and schema evolution.

The course also covers the implementation of gRPC and its integration with protobuf. You will learn how to manage the gRPC repository using github, gRPC status, error handling, resiliency server, timeout, retry, and circuit breaker. Additionally, the course covers the implementation of metadata server and client, server interceptor, client interceptor, and gRPC-REST gateway.

Throughout the course, you will work on various hands-on codes that involve creating a banking application using gRPC and protobuf, as well as using PostgreSQL database and Go Object Relational Mapper (ORM) to works with database. By the end of this course, you will have the skills and knowledge required to create microservices using gRPC and protobuf with the Go programming language.

Requirements (must-have):

  • Basic knowledge of the Go programming language

  • Familiarity with git commands (push, pull, pull request, merge, branch)

Tools:

  • Go programming language

  • Protocol Buffers (protobuf)

  • gRPC

  • Github

  • Visual Studio Code (or any editor you like)

The course delivered in lab-style teaching, where you are assigned with a task tobe solved. There will be a guidance for each task so you can try hands-on. If you stuck, you can jump to the full solution.

The course contains 130+ lectures, which cover the following topics:

  • Introduction to protobuf

  • Writing a protobuf (style guide)

  • Scalar types, repeated, enums, and Protobuf JSON

  • Other message types, multiple files and import messages, nested message types, and packages

  • Any, oneof, and maps

  • Reading and writing Protobuf to disk and JSON

  • Schema evolution and additional data types

  • Option, field validation, and field number effect tips

  • Introduction to gRPC and whether to use it or not

  • Managing & automating Protobuf and gRPC github repositories with github action

  • Implementing a unary server and client, server streaming, client streaming, and bidirectional streaming

  • Implementing a bank gRPC application with PostgrSQL database preparation, fetching exchange rates, and summarizing transactions

  • Handling gRPC status and errors, error handling on the client side, and resiliency techniques such as timeout, retry, and circuit breaker

  • Implementing metadata, server and client interceptors

  • gRPC-REST gateway

By the end of the course, you will have gained a thorough understanding of how to implement Protocol Buffers and gRPC using the Go programming language. You will learned how to follow Protobuf style guides, organize Protobuf file structures, and work with scalar types, repeated, enums, maps, any, oneof, and nested message types. They will also have learned how to read and write Protobuf to disk and JSON, handle schema evolution (forward / backward compatibility), and use additional data types.

Furthermore, you will have gained hands-on experience in implementing various types of gRPC services, including unary, server streaming, client streaming, and bidirectional streaming. You will also have learned how to handle gRPC status and errors, implement resiliency techniques such as timeout, retry, and circuit breaker. You will learn how to convert your gRPC API to REST API, using gRPC-REST gateway. You will also learn how to generate OpenAPI / swagger documentation for gRPC.

In other words, you will have gained practical skills and knowledge that you can apply to building robust and scalable microservices using Protocol Buffers and gRPC with the Go programming language.

See more

FAQ

FAQ area empty

Course curriculum

51 chương 200 bài học 8 giờ 54 phút 7 bài học thử miễn phí
Chương 1 Welcome to The Course
Chương 2 Requirements & Source Code
Chương 3 Introduction to Protocol Buffers
Chương 4 Learning Method
Chương 5 Hello Protobuf
  • Theory : Hello Protobuf 2:20
  • Task : Hello Protobuf
  • Guided Challenge : Hello Protobuf
  • Solution : Hello Protobuf 10:21
Chương 6 Scalar Types
Chương 7 Tips : Makefile
  • Tips : Makefile 2:04
Chương 8 Repeated Field, Enumerations, Comments
  • Theory : Repeated Field, Enumerations, Comments 1:17
  • Task : Repeated Field, Enumerations, Comments
  • Guided Challenge : Repeated Field, Enumerations, Comments
  • Solution : Repeated Field, Enumerations, Comments 2:15
Chương 9 Protobuf - JSON
  • Theory : Protobuf - JSON 1:01
  • Task : Protobuf - JSON
  • Guided Challenge : Protobuf - JSON
  • Solution : Protobuf - JSON 6:03
Chương 10 Using Other Message As Type
  • Theory : Using Other Message As Type 0:44
  • Task : Using Other Message As Type
  • Guided Challenge : Using Other Message As Type
  • Solution : Using Other Message As Type 2:12
Chương 11 Multiple Files & Import Message
  • Theory : Multiple Files & Import Message 1:24
  • Task : Multiple Files & Import Message
  • Guided Challenge : Multiple Files & Import Message
  • Solution : Multiple Files & Import Message 4:54
Chương 12 Nested Message Type
  • Theory : Nested Message Type 0:58
  • Task : Nested Message Type
  • Guided Challenge : Nested Message Type
  • Solution : Nested Message Type 2:06
Chương 13 Package
  • Theory : Package 1:08
  • Task : Package
  • Guided Challenge : Package
  • Solution : Package 8:43
Chương 14 Any
  • Theory : Any 1:30
  • Task : Any
  • Guided Challenge : Any
  • Solution : Any 10:05
Chương 15 Oneof
  • Theory : Oneof 1:00
  • Task : Oneof
  • Guided Challenge : Oneof
  • Solution : Oneof 3:39
Chương 16 Map
  • Theory : Map 0:24
  • Task : Map
  • Guided Challenge : Map
  • Solution : Map 1:41
Chương 17 Read / Write Protobuf to Disk
  • Theory : Read / Write Protobuf to Disk 0:32
  • Task : Read / Write Protobuf to Disk
  • Guided Challenge : Read / Write Protobuf to Disk
  • Solution : Read / Write Protobuf to Disk 4:12
Chương 18 Read / Write Protobuf as JSON
  • Theory : Read / Write Protobuf as JSON 0:28
  • Task : Read / Write Protobuf as JSON
  • Guided Challenge : Read / Write Protobuf as JSON
  • Solution : Read / Write Protobuf as JSON 1:41
Chương 19 Schema Evolution
  • Theory : Schema Evolution 6:44
  • Task : Schema Evolution
  • Guided Challenge : Schema Evolution
  • Solution : Schema Evolution 16:36
Chương 20 Tips : Field Number Effect
  • Tips : Field Number Effect 3:51
Chương 21 Additional Data Types
  • Theory : Additional Data Types 1:48
  • Task : Additional Data Types
  • Guided Challenge : Additional Data Types
  • Solution : Additional Data Types 3:58
Chương 22 Tips : Protobuf Option
  • Protobuf Option 2:14
Chương 23 Tips : Field Validation
  • Tips : Field Validation 9:35
Chương 24 Introducing gRPC
  • Theory : Introducing gRPC 8:10
  • Opinion : Use gRPC or Not? 1:07
  • Theory : Protocol Buffers & gRPC 2:54
Chương 25 Protocol Buffers Repository
  • Theory : Protocol Buffers Repository 3:20
  • Task : Protocol Buffers Repository
  • Guided Challenge : Protocol Buffers Repository
  • Solution : Protocol Buffers Repository 9:50
Chương 26 Hello gRPC (Unary Server)
  • Theory : Hello gRPC (Unary Server) 3:46
  • Task : Hello gRPC (Unary Server)
  • Guided Challenge : Hello gRPC (Unary Server)
  • Solution : Hello gRPC (Unary Server) 10:50
Chương 27 Hello gRPC (Unary Client)
  • Theory : Hello gRPC (Unary Client) 1:52
  • Task : Hello gRPC (Unary Client)
  • Guided Challenge : Hello gRPC (Unary Client)
  • Solution : Hello gRPC (Unary Client) 7:26
Chương 28 Hello gRPC (Server Stream)
  • Theory : Hello gRPC (Server Stream) 1:22
  • Task : Hello gRPC (Server Stream)
  • Guided Challenge : Hello gRPC (Server Stream)
  • Solution : Hello gRPC (Server Stream) 7:14
Chương 29 Hello gRPC (Client Stream)
  • Theory : Hello gRPC (Client Stream) 1:03
  • Task : Hello gRPC (Client Stream)
  • Guided Challenge : Hello gRPC (Client Stream)
  • Solution : Hello gRPC (Client Stream) 7:43
Chương 30 Hello gRPC (Bi-Directional Stream)
  • Theory : Hello gRPC (Bi-Directional Stream) 1:32
  • Task : Hello gRPC (Bi-Directional Stream)
  • Guided Challenge : Hello gRPC (Bi-Directional Stream)
  • Solution : Hello gRPC (Bi-Directional Stream) 7:20
Chương 31 Bank - gRPC Preparation
  • Theory : Bank - gRPC Preparation 0:36
  • Task : Bank - gRPC Preparation
  • Guided Challenge : Bank - gRPC Preparation
  • Solution : Bank - gRPC Preparation 9:48
Chương 32 Bank - Database Preparation
  • Theory : Bank - Database Preparation 3:15
  • Task : Bank - Database Preparation
  • Guided Challenge : Bank - Database Preparation
  • Solution : Bank - Database Preparation 14:52
Chương 33 Bank - Database Structure
  • Theory : Bank - Database Structure 0:48
  • Task : Bank - Database Structure
  • Guided Challenge : Bank - Database Structure
  • Solution : Bank - Database Structure 3:29
Chương 34 Bank - Get Current Balance
  • Theory : Bank - Get Current Balance 1:00
  • Task : Bank - Get Current Balance
  • Guided Challenge : Bank - Get Current Balance
  • Solution : Bank - Get Current Balance 6:42
Chương 35 Bank - Fetch Exchange Rates
  • Theory : Bank - Fetch Exchange Rates 0:57
  • Task : Bank - Fetch Exchange Rates
  • Guided Challenge : Bank - Fetch Exchange Rates
  • Solution : Bank - Fetch Exchange Rates 17:57
Chương 36 Bank - Summarize Transactions
  • Theory : Bank - Summarize Transactions 0:52
  • Task : Bank - Summarize Transactions
  • Guided Challenge : Bank - Summarize Transactions
  • Solution : Bank - Summarize Transactions 19:37
Chương 37 Bank - Multiple Transfers
  • Theory : Bank - Multiple Transfers 0:29
  • Task : Bank - Multiple Transfers
  • Guided Challenge : Bank - Multiple Transfers
  • Solution : Bank - Multiple Transfers 21:59
Chương 38 GRPC Status & Errors - Part 1
  • Theory : gRPC Status & Errors - Part 1 3:34
  • Task : gRPC Status & Errors - Part 1
  • Guided Challenge : gRPC Status & Errors - Part 1
  • Solution : gRPC Status & Errors - Part 1 4:37
Chương 39 GRPC Status & Errors - Part 2
  • Theory : gRPC Status & Errors - Part 2 1:06
  • Task : gRPC Status & Errors - Part 2
  • Guided Challenge : gRPC Status & Errors - Part 2
  • Solution : gRPC Status & Errors - Part 2 7:34
Chương 40 GRPC Status & Errors - Part 3
  • Theory : gRPC Status & Errors - Part 3 0:57
  • Task : gRPC Status & Errors - Part 3
  • Guided Challenge : gRPC Status & Errors - Part 3
  • Solution : gRPC Status & Errors - Part 3 4:29
Chương 41 Error Handling on gRPC Client
  • Theory : Error Handling on gRPC Client 0:53
  • Task : Error Handling on gRPC Client
  • Guided Challenge : Error Handling on gRPC Client
  • Solution : Error Handling on gRPC Client 24:34
Chương 42 Resiliency - Server
  • Theory : Resiliency - Server 2:31
  • Task : Resiliency - Server
  • Guided Challenge : Resiliency - Server
  • Solution : Resiliency - Server 20:59
Chương 43 Resiliency - Timeout (Deadline)
  • Theory : Resiliency - Timeout (Deadline) 0:40
  • Task : Resiliency - Timeout (Deadline)
  • Guided Challenge : Resiliency - Timeout (Deadline)
  • Solution : Resiliency - Timeout (Deadline) 16:06
Chương 44 Resiliency - Retry
  • Theory : Resiliency - Retry 2:59
  • Task : Resiliency - Retry
  • Guided Challenge : Resiliency - Retry
  • Solution : Resiliency - Retry 7:42
Chương 45 Resiliency - Circuit Breaker
  • Theory : Resiliency - Circuit Breaker 2:14
  • Task : Resiliency - Circuit Breaker
  • Guided Challenge : Resiliency - Circuit Breaker
  • Solution : Resiliency - Circuit Breaker 6:55
Chương 46 Metadata - Server
  • Theory : Metadata - Server 2:43
  • Task : Metadata - Server
  • Guided Challenge : Metadata - Server
  • Solution : Metadata - Server 10:38
Chương 47 Metadata - Client
  • Theory : Metadata - Client 1:11
  • Task : Metadata - Client
  • Guided Challenge : Metadata - Client
  • Solution : Metadata - Client 10:04
Chương 48 Interceptor
  • Theory : Interceptor 7:44
  • Task : Interceptor (Server)
  • Guided Challenge : Interceptor (Server)
  • Solution : Interceptor (Server) 11:12
  • Task : Interceptor (Client)
  • Guided Challenge : Interceptor (Client)
  • Solution : Interceptor (Client) 14:41
Chương 49 GRPC-REST Gateway
  • Theory : gRPC-REST Gateway 3:17
  • Task : gRPC-REST Gateway (Preparation)
  • Guided Challenge : gRPC-REST Gateway (Preparation)
  • Solution : gRPC-REST Gateway (Preparation) 9:19
  • Task : gRPC-REST Gateway (Default Mapping)
  • Guided Challenge : gRPC-REST Gateway (Default Mapping)
  • Solution : gRPC-REST Gateway (Default Mapping) 7:42
  • Task : gRPC-REST Gateway (Annotation Mapping)
  • Guided Challenge : gRPC-REST Gateway (Annotation Mapping)
  • Solution : gRPC-REST Gateway (Annotation Mapping) 6:57
  • Task : gRPC-REST Gateway (External Mapping)
  • Guided Challenge : gRPC-REST Gateway (External Mapping)
  • Solution : gRPC-REST Gateway (External Mapping) 5:31
Chương 50 Securing gRPC
  • Theory : Securing gRPC 3:36
  • Task : Securing gRPC (Server)
  • Guided Challenge : Securing gRPC (Server)
  • Solution : Securing gRPC (Server) 2:32
  • Task : Securing gRPC (Client)
  • Guided Challenge : Securing gRPC (Client)
  • Solution : Securing gRPC (Client) 1:48
  • Task : Securing gRPC (REST Gateway)
  • Guided Challenge : Securing gRPC (REST Gateway)
  • Solution : Securing gRPC (REST Gateway) 2:02
Chương 51 Resources & References
  • Download Source Code, Scripts, and References
  • Bonus Lecture

Requirment

  • Basic Go programming language is required. This is NOT a fundamental Go course. You need to know about Go syntax, module, and package

  • Basic git and github knowledge is required : create repository, branch, pull, push, and merge. This is NOT basic git course

  • Familiarity with REST API and JSON will helps, but not mandatory

Outcomes

  • What is Protocol Buffers (Protobuf) and how to use it for data communication

  • Protocol Buffers Schema Definition : data types, list, syntax, etc

  • Protocol Buffers Schema Evolution

  • Implement Protocol Buffers with Go programming language

  • Implement 4 types of gRPC API using Golang : unary, server streaming, client streaming, and bi-directional

  • Use PostgreSQL database with gorm : Go Object Relational Mapping (ORM)

  • Use Hexagon Software Architecture (Port & Adapters) to build bank application on top of gRPC API with Golang

  • Building resilient gRPC : using timeout / deadline, retry, and circuit breaker

  • gRPC error handling, status codes, metadata, interceptor

  • gRPC - REST API gateway

  • Generate OpenAPI documentation for gRPC API

Instructor

...
Timotius P

0.0

  • ... 0 Student
  • ... 2 Courses
  • ... 0 review

View Details

Reviews

Rate this course :

Remove all