All containers will automatically be constructed, apps will be available once containers indicate they're "listening at localhost:xxxx"
The axum_be and python_be containers will only start once the postgres container is running
Container axum_be (localhost:3001)
The main container in this PoC. Serves a webapp on port 3001 that can perform CRUD operations on the postgres container's database.
Is built with the Axum web framework for Rust, which itself is built on Tokio, an asynchronous runtime for Rust.
Can also run a performance comparison between itself and the python_be container. When triggered, both containers perform a bubble sort on an array of 100,000 random integers stored in the database.
Features some security features from Tokio such as Tower, which protect from XSS, add logging, and doesn't allow authenticated requests via HTTPS
Sends queries to the database via SQLX, which validates user input by only ever treating it as data, never as executable code
Container python_be (localhost:8000)
"Support" container for the main one. Is able to perform the bubble sort and send telemetry
Also features a more basic version of the same index.html page as the axum_be container, which lets it run CRUD operations on the shared database
Container postgres (localhost:5432)
Shared database for the axum_be, python_be and rocket_app container
Creates a table with sample users, and another for the random integer array
Container redis (localhost:6379)
Data from how the containers are performing in the race is sent to this container, which is then polled by the JavaScript which operates the race in order to display each container's performance live