Skip to content

Gabryel lessa - Back-end Developer Challenge#189

Open
GabryelLessa wants to merge 13 commits intodynamox-s-a:mainfrom
GabryelLessa:gabryel-lessa
Open

Gabryel lessa - Back-end Developer Challenge#189
GabryelLessa wants to merge 13 commits intodynamox-s-a:mainfrom
GabryelLessa:gabryel-lessa

Conversation

@GabryelLessa
Copy link
Copy Markdown

No description provided.

Gabriel added 13 commits March 4, 2026 21:17
- requirements.txt with fastapi, sqlalchemy, pydantic, pytest, locust
- .env.example with default sqlite url
- .gitignore
composite index on (series_id, timestamp) for faster range queries
bulk insert data points on create, composite index query on get_data_points
store, retrieve, delete, count, list, get_metrics
_compute_metrics is a module-level function (no reason to be a method)
latency middleware logging requests > 350ms
global exception handler to avoid leaking stack traces
unit tests mock the repo layer, integration tests use in-memory sqlite
conftest wires up the async client with db override
two methods: linear regression and holt-winters double exponential smoothing
auto mode picks the best one based on holdout RMSE (last 20% of data)
falls back to pure numpy if statsmodels isn't available

added PredictRequest/PredictOut schemas, predict() on service,
POST /{id}/predict endpoint and unit tests
least_conn balancing, rate limiting (100r/s per IP), keepalive upstream
docker-compose spins up nginx + api1/2/3 all sharing the same sqlite volume
3 user profiles: Writer, Reader, Cleanup
SLO check on exit: p95 < 350ms and error rate < 1%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant