The game-app service provides game statistics based on the geographic area code. This service is defined in the Protocol Buffers (proto3) language and utilizes gRPC for service communication.
Make sure to create an .env file at the root of your project with the necessary environment variables. A .env.local file is also used for local builds.
The following commands are available for building and running the project with Docker:
- Build the Docker images:
make build - Start the Docker containers:
make up - Stop the Docker containers:
make down - Start the containers if they're stopped:
make start - Stop the containers if they're running:
make stop - Build and start the containers:
make start-all
To run the GRPC client, use the command:
make client
The following commands are available for local builds and runs:
- Build the client binary:
make build-local-bin-client - Build the server binary:
make build-local-bin-server - Build both client and server binaries:
make build-local-bin - Run the server:
make up && ./bin/server -e=.env.local - Run the client on different terminal other than the server:
make up && ./bin/client -e=.env.local
cd clients && go run client.go- Documentation of the web service protocol.
- The code for the web service.
- A document explaining the design choices made when creating the web service, including how your service scales to support more than a million concurrent gamers.
- Preferred technologies:
- Using Protobuf for model generation and Data Transfer Objects (DTOs).
- Using a No-SQL database for persistent storage.
- Loading sensitive information from environment variables.
- Adding a logical cache layer (in-memory structures or Redis can be used).
- Adding a Makefile.
- Creating separate logical layers for handlers, business logic, cache, and storage.
- Writing unit tests.
- A single docker-compose file to start all services, including the database, cache, etc.
