Skip to content

Ariel Fernandes - Backend Challenge Solution#193

Open
arielfernandes wants to merge 23 commits intodynamox-s-a:mainfrom
arielfernandes:ariel-fernandes
Open

Ariel Fernandes - Backend Challenge Solution#193
arielfernandes wants to merge 23 commits intodynamox-s-a:mainfrom
arielfernandes:ariel-fernandes

Conversation

@arielfernandes
Copy link
Copy Markdown

Solução - Backend Challenge

Deploy

Tecnologias

  • Python 3.11 + FastAPI
  • SQLAlchemy + PostgreSQL (produção) / SQLite (desenvolvimento)
  • Pydantic + Pydantic Settings
  • Pytest (testes unitários, integração e benchmark de latência)
  • Docker + Nginx
  • Railway (deploy)

Funcionalidades Implementadas

  • POST /time-series/ — armazenar série temporal
  • GET /time-series/{id} — recuperar série completa
  • GET /time-series/{id}/metrics — métricas (min, max, média, desvio padrão)
  • GET /time-series/{id}/predict — predição de valores futuros
  • GET /time-series/count — total de séries armazenadas
  • DELETE /time-series/{id} — deletar série

Predição

Implementada usando Holt-Winters (Exponential Smoothing) com fallback automático para Regressão Linear em casos de dados insuficientes ou degenerados.

Performance

Todos os endpoints atendem ao requisito de latência inferior a 350ms, com média abaixo de 10ms nos testes de benchmark.

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