|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/using-grpc-in-microservices-communication-with-net-5/
课程评论:没有评论
课程名称:使用 gRPC 进行 .Net 5 微服务通信 课程概述: 在本课程中,您将学习如何使用 .Net 5 和 AspNet 5 构建高性能的 gRPC 微服务间通信。微服务是一种现代分布式系统,因此利用 ASP.NET 5 中的 gRPC,我们将开发高性能的跨平台应用程序,用于构建分布式系统和 API。这是后端微服务、内部网络应用程序或 IoT 设备和服务之间通信的理想选择。随着 ASP.NET 5 的发布,微软已为创建 gRPC 服务提供了头等支持。本课程将引导您开始构建、开发和管理基于分布式微服务架构的 gRPC 服务器和客户端。 课程项目的总体架构设计将包括 6 个微服务,我们将逐个开发。我们将使用 Worker Services 和 Asp.Net 5 gRPC 应用程序来构建客户端和服务器 gRPC 组件,并定义 proto 服务定义合同。我们将实现一个真实世界的电子商务用例,完全依靠 gRPC 进行通信。我们将有 3 个 gRPC 服务器应用程序,分别是产品、购物车和折扣 gRPC 服务。以及 2 个 Worker 服务,即产品和购物车 Worker 服务。Worker 服务将在客户端执行操作并与 gRPC 服务器应用程序进行交互,并且我们将使用独立的 Identity Server 微服务,通过 OAuth 2.0 和 JWT 令牌来保护 gRPC 服务。 课程内容包括: 1. **ProductGrpc 服务器应用程序**:首先开发 ProductGrpc 项目,这是一个 ASP.NET gRPC 服务器 web 应用程序,提供产品 CRUD 操作的 API。 2. **Product Worker Service**:开发 Product Worker Service 项目,用于消费 ProductGrpc 服务并生成和批量插入产品记录到数据库。 3. **ShoppingCartGrpc 服务器应用程序**:随后开发 ShoppingCartGrpc 项目,这是一个 ASP.NET gRPC 服务器 web 应用程序,提供购物车及其项目操作的 API。 4. **ShoppingCart Worker Service**:开发 ShoppingCart Worker Service 项目,作为 ProductGrpc 和 ShoppingCartGrpc 应用程序的客户端,读取产品并将产品项添加到购物车中。 5. **DiscountGrpc 服务器应用程序**:在将产品项目添加到购物车时,计算最终价格并检索折扣值,使用与 ShoppingCartGrpc 和 DiscountGrpc 应用程序的 gRPC 调用进行通信。 6. **身份服务器**:开发集中式的独立认证服务器,实现 IdentityServer4 包,用于保护购物车 gRPC 服务,通过 OAuth 2.0 和 JWT 令牌进行身份验证。 通过本课程,您将对如何使用 gRPC 实现快速和分布式微服务系统有一个实用的理解。此外,您还将学习如何在微服务架构中使用 IdentityServer 保护 gRPC 服务。 该课程非常注重实践,90%以上的课程内容将涉及到与讲师一起编码。如果您是通过实践学习的人,那么这门课非常适合您。 工具要求: 本课程中的所有课程演示均使用 Visual Studio 2019 作为代码编辑器。您当然可以使用任何您喜欢的代码编辑器和任何操作系统,只要是 Windows 或 Mac 系统即可。
You will learn how to Build a high-performance gRPC Inter-service Communication between backend microservices with.Net 5 and AspNet 5.Microservices are modern distributed systems so with gRPC in ASP.NET 5, we will develop high-performance, cross-platform applications for building distributed systems and APIs. It's an ideal choice for communication between backend microservices, internal network applications, or iot devices and services. With the release of ASP.NET 5, Microsoft has added first-class support for creating gRPC services with Asp.Net 5.This course will led you get started building, developing and managing gRPC servers and clients on distributed microservices architecture.Overall Architecture of Course Project We can design that we will have 6 microservices which we are going to develop one by one.We will use Worker Services and Asp.Net 5 Grpc Applications to build client and server gRPC components defining proto service definition contracts.We will implement realworld e-commerce use case with only gRPC communication. We will have 3 gRPC server applications which are Product - ShoppingCart and Discount gRPC services. And we will have 2 worker services which are Product and ShoppingCart Worker Service. Worker services will be client and perform operations over the gRPC server applications. And we will secure the gRPC services with standalone Identity Server microservices with OAuth 2.0 and JWT token.ProductGrpc Server ApplicationFirst of all, we are going to develop ProductGrpc project. This will be Asp.Net gRPC server web application and expose apis for Product Crud operations.Product Worker ServiceAfter that, we are going to develop Product Worker Service project for consuming ProductGrpc services. This product worker service project will be the client of ProductGrpc application and generate products and insert bulk product records into Product database by using client streaming gRPC proto services of ProductGrpc application. This operation will be in a time interval and looping as a service application.ShoppingCartGrpc Server ApplicationAfter that, we are going to develop ShoppingCartGrpc project. This will be Asp.Net gRPC server web application and expose apis for SC and SC items operations. The grpc services will be create shopping cart and add or remove item into shopping cart.ShoppingCart Worker ServiceAfter that, we are going to develop ShoppingCart Worker Service project for consuming ShoppingCartGrpc services. This ShoppingCart worker service project will be the client of both ProductGrpc and ShoppingCartGrpc application. This worker service will read the products from ProductGrpc and create sc and add product items into sc by using gRPC proto services of ProductGrpc and ShoppingCartGrpc application. This operation will be in a time interval and looping as a service application.DiscountGrpc Server ApplicationWhen adding product item into SC, it will retrieve the discount value and calculate the final price of product. This communication also will be gRPC call with SCGrpc and DiscountGrpc application.Identity ServerAlso, we are going to develop centralized standalone Authentication Server with implementing IdentityServer4 package and the name of microservice is Identity Server.Identity Server4 is an open source framework which implements OpenId Connect and OAuth2 protocols for.Net Core.With IdentityServer, we can provide protect our ShoppingCart gRPC services with OAuth 2.0 and JWT tokens. SC Worker will get the token before send request to ShoppingCart Grpc server application.By the end of this course, you will have a practical understanding of how to use gRPC to implement a fast and distributed microservices systems. And Also you'll learn how to secure protected grpc services with IdentityServer in a microservices architecture.Is this course for you?This course is very practical, about 90%+ of the lessons will involve you coding along with me on this project. If you are the type of person who gets the most out of learning by doing, then this course is definitely for you. Tools you need for this courseIn this course all the lessons are demonstrated using Visual Studio 2019 as a code editor. You can of course use any code editor you like and any Operating system you like as long as it's Windows or Mac.