Just for fun weekend project about microservices and RPC communication.
To run this project, you will need of docker-compose on your machine.
After installation, you can run:
$ docker-compose up
The command above will build and run the docker images, because we have two services.
When the project starts, it loads all the items from the ports.json file into the portdomainservice
project via RPC calls. It also has a Rest API that allows you to search ports using your ID.
The service is responsible for saving the ports into database. It uses a simple memory database that can manage concurrent calls.
- Golang
- RPC using Twirp
- Docker and Docker Compose
This folder contains the two services (clientapi, portdomainservice) that are used in the project. Here a binary is assembled with all its dependencies, depending on the project and needs.
This folder we have two others folders that contain the portdomainservice repository logic (repo folder) and the portdomainservice server implementation (server folder).
This folder we build the memory database used by portdomainservice.
This folder we build the .proto file used by portdomainservice. Here is only allowed edit the .proto file. The *pb.go and *twirp.go are build using this command:
$ protoc --go_out=paths=source_relative:. --twirp_out=paths=source_relative:. rpc/ports.proto