How th3y3m/grpc-multi-server-demo works
Project type and purpose
• This is a microservices-style demo (“grpc-multi-server-demo”) built with .NET, showcasing an API Gateway fronting two gRPC back-end services (Category and Product), sharing Protobuf contracts, using Redis caching, and EF Core–backed persistence.
File structure
• Top-level projects:
• ApiGateway – ASP.NET Core HTTP API + Redis cache + proxy layer
• CategoryGrpcServer – gRPC service for “Category” with Application, Domain, Infrastructure layers
• ProductGrpcServer – gRPC service for “Product” with CQRS-style Commands/Queries
• GrpcContracts – shared .proto definitions and repository/UoW abstractions
• Notice cross-cutting concerns:
• Caching (CacheRedis)
• Business logic vs proxy layer in ApiGateway
• EF Core Migrations in each gRPC server’s Infrastructure
• Middleware for error wrapping in the Gateway
README for additional insights
• README is minimal, but project name and structure strongly imply an API Gateway + multiple gRPC servers demo.
• The purpose: illustrate multi-server gRPC integration, shared contracts, caching, and clean layering.
• Rectangles for logical components (Gateway, Services)
• Labels & details:
• Caching step (Cache key lookup → hit/miss)
• EF Core migrations in service infra
Essential elements
• Clear component boundaries with labels
• Annotations for patterns (e.g., “CQRS”, “UnitOfWork”)
• Call out middleware in Gateway (ErrorWrappingApiMiddleware)