My implementation of Distributed Id Generator in .NET 9
This project is a distributed ID generator built using .NET 9. The system is designed to generate unique IDs in a distributed environment, ensuring high availability and scalability. The implementation leverages gRPC for communication between services and includes various modern technologies to enhance resilience, observability, and API documentation.
- Distributed ID Generation: Ensures unique ID generation across multiple instances.
- gRPC Communication: Utilizes gRPC for efficient and robust communication between services.
- Resilience and Observability: Integrates with OpenTelemetry for monitoring and resilience.
- API Documentation: Uses Swagger for API documentation and OpenAPI for client generation.
- .NET 9: The latest version of .NET for building high-performance applications.
- gRPC: A high-performance RPC framework for communication between services.
- OpenTelemetry: Provides observability into the system with tracing and metrics.
- Swagger/OpenAPI: For API documentation and client generation.
- Protobuf: Protocol Buffers for efficient serialization of messages.
graph TD;
A[IdGen.Api] --> x[Client]
B[IdGen.Grpc] --> y[Server]
C[IdGen.Aspire.ServiceDefaults] --> z[Shared]
D[IdGen.Aspire.AppHost]
- IdGen.Api: The API project that acts as a client to the gRPC service.
- IdGen.Grpc: The gRPC service that handles ID generation.
- IdGen.Aspire.ServiceDefaults: Contains shared service configurations and defaults for observability and resilience.
- IdGen.Aspire.AppHost: The application host for running the services.
- .NET 9 SDK
- Visual Studio 2022
- Clone the repository:
git clone https://github.com/your-repo/distributed-id-generator.git
- Navigate to the solution directory:
cd distributed-id-generator
- Run the Aspire AppHost project:
dotnet run
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.