This is a reference project for creating a distributed system with multiple microservices using gRPC and Rust. The project is structured as a monorepo and each microservice is a separate crate.
The project uses the following technologies:
- Rust as the programming language
- Tokio as the async runtime
- Protobuf for defining the gRPC messages and services
- Docker for containerizing the microservices
- GitHub Actions for continuous integration
The project is structured as follows:
- Each microservice is a separate crate in the
srcdirectory - The
protosdirectory contains the protobuf definitions for the gRPC messages and services - The Dockerfiles for building the Docker images for each microservice are in the root directory
- The
.github/workflowsdirectory contains the GitHub Actions workflows for building and deploying the project
To run the project locally, you will need to have Docker and the protoc compiler installed on your machine. Once you have those installed, you can use the following commands to build and run the project:
docker-compose up -d- This command will build the Docker images for each microservice and start them in detached mode.docker-compose ps- This command will show you the status of the running containers. You can use this command to verify that all the microservices are running correctly.- You can use the CLI client to interact with the microservices. The CLI client is in the
src/clientdirectory. You can run it with the following command:cargo run --bin client -- --help
This project is a reference project for creating a distributed system with multiple microservices using gRPC and Rust. It is a personal project that I use as a reference for my own projects. It could also be useful for others who are looking to create a similar project.