This project is used as a playground and knowledge base for technoligies that I commonly interact with.
All the infrastructure is defined with terraform and terragrunt, and intended to be run on Kubernetes.
Some services use external resources, such as gcp cloud functions and gcp cloud run, but they are still managed via kubernetes (see GCP ConfigConnector), and traffic is routed to the resources via kubernetes Services (externalName). All the traffic is kept within the same VPC, so services do not need egress access to the public internet.
The cloud infrastructure is mirrored locally, using minikube, along within app specific docker-compose defintions, for running partial local services.
This project uses two different appraoches for definition docker images, traditional and wasm.
Traditional docker images, use multi stage builds, using the native OS architecture
https://wasmedge.org/docs/develop/build-and-run/docker_wasm/
WASM images are built from scratch, and simply host the webassemby binaries. These images require beta features of the docker engine.
Simple application, that uses declaritive state to update objects.
Similar to POST vs PUT requests, the appliction always uses POST requests, for both creation and update requests.
- Frontend retrieves observed state from API
- User updates state and submits the desired state to the API
- API compares the desired and observed state, to creates a diff
- Attempts to reconcile the diff
- If successful, diff is stored into a timeseries db
- API returns latest observed state