Session
2 Days workshop - From RESTful API to gRPC
It is contract-based, performant - with smaller response/request bodies, perfect for polyglot environments and supports different models – from client-server to bi-directional streaming out of the box. If we sprinkle some client-side load balancing, transient fault-handling and the ability of exposing a gRPC service also as a HTTP API, we might the perfect point-to-point communication mechanism.
In this workshop you will learn the how and the whys and understand where gRPC fits in the .NET APIs ecosystem. At the end of the workshop you will be able to use gRPC in real production environments.
Topics covered:
Introduction
- What gRPC is and how it fits in an API context
- gRPC vs RESTful APIs
- gRPC vs WCF
Protocol Buffers
- working with .proto files
- understanding the syntax
- defining custom types
Working with gRPC
- the 4 gRPC modes
- Implementing and consuming gRPC services
- Documenting and exposing gRPC endpoints
gRPC internals
- Accessing the gRPC context
- Accessing the gRPC HTTP context
- Trailers
- Headers
- Status codes in gRPC
- Exceptions in gRPC
Transient fault-handling
- Defining policies
- Configuring a retry policy
- Configuring a hedging policy
Interceptors
- Client interceptors
- Server interceptors
- Configuring interceptors
- Interceptors vs Middleware
Client-side load balancing
- implementing a client-side load balancing
- Configuring client-side load balancing
- load balancing policies
- Round-Robin
- Pick first
- Implementing our own policy
Transcoding
- what is is gRPC transcoding
- exposing our services as HTTP
- Consuming methods from the browser
- How routing works with gRPC transcoding
- gRPC JSON transcoding vs gRPC-Web
- grpc-gateway - alternative to transcoding
Testing
- Testing with Postman
- Unit testing service operations
Health-checks
- Implementing health checks
Securing gRPC services
Documenting gRPC endpoints
Prerequisites
Attendees will require a laptop with the latest version on .NET SDK and their editor/IDE of choice: Visuals Studio 2022
Irina Dominte(Scurtu)
Microsoft MVP, Software Architect @Particular Software
Iaşi, Romania
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top