Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rochabr/dapr-grpc-resiliency
https://github.com/rochabr/dapr-grpc-resiliency
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rochabr/dapr-grpc-resiliency
- Owner: rochabr
- Created: 2024-11-28T03:20:42.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T17:20:05.000Z (2 months ago)
- Last Synced: 2024-11-28T18:28:11.664Z (2 months ago)
- Language: C#
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dapr gRPC Demo with Resiliency Patterns
This demo showcases Dapr service invocation using gRPC with built-in resiliency patterns including retries, circuit breakers, and timeouts.
## Prerequisites
- .NET 7.0 or later
- Dapr CLI
- Docker## Project Structure
- `src/WeatherService`: gRPC service providing weather forecasts
- `src/WeatherClient`: Console application consuming the weather service
- `dapr/config`: Dapr configuration files
- `dapr/components`: Dapr component definitions## Running the Demo
1. Start the Weather Service:
```bash
cd src/WeatherService
dapr run --app-id weatherservice --app-port 5000 --app-protocol grpc --resources-path ../../components -- dotnet run
```2. Start the Weather Client:
```bash
cd src/WeatherClient
dapr run --app-id weatherclient --resources-path ../../components -- dotnet run
```## Resiliency Patterns
The demo implements three resiliency patterns:
- Retries with exponential backoff
- Circuit breaker
- TimeoutsConfigure these patterns in `components/resiliency.yaml`.