NB!: This is not the version I submitted to the challenge. You can find that version on the branch v1.
Check out my blog post about my solution and official results.
Check out my blog post about my solution and official results.
make run # Start only the APP
make up-deps # Start the app and dependencies (DB and Redis)
make tests # Run acceptance tests
make lint # Run linter
make compose-up # Start the app with docker-compose
Some decisions here are intended just to make the code simpler and faster to write, but they are not ideal for production software. For example:
- Pre-allocating all DB connections available for the app. It speeds up the warm-up, but it's not ideal.
- Not enforcing uniqueness of UUID on the write table. The likelihood of collision is very low, but it's not zero.
- etc.. :)
Feel free to explore, fork and send PRs. :)
The load tests are executed on CI and results are published in Github Pages and can be seen here as an example.
make compose-up
curl -v "http://localhost:9999/contagem-pessoas"
These tests are based on the challenge instructions and ensure the application works. They run against a test server without Nginx, but using a real database that is automatically started using testconainers.
make tests