|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/backend-master-class-golang-postgresql-kubernetes/
课程评论:没有评论
课程名称:后端大师班 [Golang + Postgres + Kubernetes + gRPC] 课程概述:在本课程中,您将逐步学习如何从零开始设计、开发和部署一个后端 web 服务。我相信学习编程的最佳方式是构建一个真实的应用。因此,在整个课程中,您将学习如何为一个简单的银行构建后端 web 服务,提供前端所需的 API,完成以下功能:创建和管理银行账户、记录每个账户的余额变更,以及在两个账户之间进行资金转移。 我们将使用 Golang 编写服务,但课程不仅限于 Go 的编码,您还将学习到许多与后端 web 开发相关的不同主题,课程分为六个部分: 第一部分:深入学习数据库设计,生成与数据库可靠交互的代码,使用事务理解数据库隔离级别,确保在生产环境中正确使用。此外,您还将学习如何使用 Docker 进行本地开发,如何使用 Git 管理代码,以及如何使用 GitHub Action 自动运行单元测试。 第二部分:构建一组基于 Gin 的 RESTful HTTP API,这是一个流行的 Golang 框架。我们将涵盖从加载应用配置到模拟数据库以增强单元测试的所有内容,包括处理错误、用户身份验证以及使用 JWT 和 PASETO 令牌来保护 API。 第三部分:学习如何使用 Docker 构建您的应用并将其部署到 AWS 的生产 Kubernetes 集群中。讲座将提供详细的逐步指导,包括如何构建最小的 Docker 镜像、设置免费的 AWS 账户、创建生产数据库、存储与检索生产秘密、创建 EKS 的 Kubernetes 集群、使用 GitHub Action 自动部署镜像、购买域名并将流量路由到服务,以及使用 HTTPS 保护连接并自动续订来自 Let's Encrypt 的 TLS 证书。 第四部分:讨论若干高级后端主题,如管理用户会话、构建 gRPC API、使用 gRPC 网关同时服务 gRPC 和 HTTP 请求、将 Swagger 文档嵌入为后端服务的一部分、使用可选参数部分更新记录,以及编写结构化的 logger HTTP 中间件和 gRPC 拦截器。 第五部分:介绍 Golang 中的异步处理,使用后台工作者和 Redis 作为消息队列。我们还将学习如何通过 Gmail SMTP 服务器创建和发送电子邮件给用户。在此过程中,还将学习为可能涉及模拟多个依赖项的 gRPC 服务编写单元测试。 第六部分:课程的最后一部分讨论如何提高服务器的稳定性和安全性,包括更新依赖包到最新版本、使用 Cookies 使刷新令牌更安全,以及学习如何优雅地关闭服务器以保护处理资源。鉴于这一部分仍在进行中,我们将持续制作和上传新主题的视频,请随时回来查看更新。 本课程的设计详细周到,即使是编程经验非常少的学员也能理解并独立完成。我坚信完成课程后,您将在项目中能够更自信和有效地工作。
In this course, you will learn step-by-step how to design, develop and deploy a backend web service from scratch. I believe the best way to learn programming is to build a real application. Therefore, throughout the course, you will learn how to build a backend web service for a simple bank. It will provide APIs for the frontend to do the following things:Create and manage bank accounts.Record all balance changes to each of the accounts.Perform a money transfer between 2 accounts.The programming language we will use to develop the service is Golang, but the course is not just about coding in Go. You will learn a lot of different topics regarding backend web development. They are presented in 6 sections: In the 1st section, you will learn deeply about how to design the database, generate codes to talk to the DB in a consistent and reliable way using transactions, understand the DB isolation levels, and how to use it correctly in production. Besides the database, you will also learn how to use docker for local development, how to use Git to manage your codes, and how to use GitHub Action to run unit tests automatically.In the 2nd section, you will learn how to build a set of RESTful HTTP APIs using Gin - one of the most popular Golang frameworks for building web services. This includes everything from loading app configs, mocking DB for more robust unit tests, handling errors, authenticating users, and securing the APIs with JWT and PASETO access tokens. In the 3rd section, you will learn how to build your app with Docker and deploy it to a production Kubernetes cluster on AWS. The lectures are very detailed with a step-by-step guide, from how to build a minimal docker image, set up a free-tier AWS account, create a production database, store and retrieve production secrets, create a Kubernetes cluster with EKS, use GitHub Action to automatically build and deploy the image to the EKS cluster, buy a domain name and route the traffics to the service, secure the connection with HTTPS and auto-renew TLS certificate from Let's Encrypt.In the 4th section, we will discuss several advanced backend topics such as managing user sessions, building gRPC APIs, using gRPC gateway to serve both gRPC and HTTP requests at the same time, embedding Swagger documentation as part of the backend service, partially updating a record using optional parameters, and writing structured logger HTTP middlewares and gRPC interceptors.Then the 5th section will introduce you to asynchronous processing in Golang using background workers and Redis as its message queue. We'll also learn how to create and send emails to users via Gmail SMTP server. Along the way, we'll learn more about writing unit tests for our gRPC services that might involve mocking multiple dependencies at once.The final section 6th concludes the course with lectures about how to improve the stability and security of the server. We'll keep updating dependency packages to the latest version, use Cookies to make the refresh token more secure, and learn how to gracefully shut down the server to protect the processing resources. As this part is still a work in progress, we will keep making and uploading new videos about new topics in the future. So please come back here to check them out from time to time.This course is designed with a lot of details, so that everyone, even those with very little programming experience can understand and do it by themselves. I firmly believe that after the course, you will be able to work much more confidently and effectively on your projects.