Cinema is an example project which demonstrates the use of microservices for a fictional movie theater. The Cinema backend is powered by 4 microservices, all of which happen to be written in Go, using MongoDB for manage the database and Docker to isolate and deploy the ecosystem.
- Movie Service: Provides information like movie ratings, title, etc.
- Show Times Service: Provides show times information.
- Booking Service: Provides booking information.
- Users Service: Provides movie suggestions for users by communicating with other services.
The Cinema use case is based on the project written in Python by Umer Mansoor.
The project structure is based in the knowledge learned in:
- Golang structure: https://peter.bourgon.org/go-best-practices-2016/#repository-structure
- Book Let's Go: https://lets-go.alexedwards.net/
Container images used support multi-architectures (amd64, arm/v7 and arm64).
The application can be deployed in both environments: local machine or in a kubernetes cluster. You can find the appropriate documentation for each case in the following links:
Services are instrumented through OpenTelemetry. If a service is not yet instrumented, you're welcome to add it!
Each service is already configured in Docker Compose to support otel signals collection.
Copy the .env.example
to .env
and provide all required information.
Pay attention to:
- updating
SERVICE_ENVIRONMENT
if multiple users are using the same otel backend, to help with filtering - updating
OTEL_EXPORTER_OTLP_ENDPOINT
with your backend endpoint - updating
OTEL_EXPORTER_OTLP_HEADERS
with your backend authentication token