Skip to content

feat: add teckel-server — non-blocking HTTP server#8

Merged
rafafrdz merged 1 commit intomainfrom
feat/teckel-server
Mar 27, 2026
Merged

feat: add teckel-server — non-blocking HTTP server#8
rafafrdz merged 1 commit intomainfrom
feat/teckel-server

Conversation

@rafafrdz
Copy link
Copy Markdown
Member

Summary

  • New crate teckel-server providing a concurrent, non-blocking HTTP server for Teckel pipeline execution
  • Built on axum + tokio with semaphore-bounded worker pool, DashMap job store, and CancellationToken support
  • Endpoints: health, validate (sync), explain (sync), jobs submit/poll/cancel/list (async)
  • CORS enabled for browser access from teckel-ui
  • Configurable via env vars: TECKEL_HOST, TECKEL_PORT, TECKEL_MAX_CONCURRENCY

Test plan

  • cargo build -p teckel-server compiles clean
  • cargo clippy -p teckel-server -- -D warnings passes
  • Start server and test GET /api/health
  • Submit YAML via POST /api/validate and verify sync response
  • Submit job via POST /api/jobs, poll with GET /api/jobs/:id
  • Cancel running job with DELETE /api/jobs/:id

🤖 Generated with Claude Code

…tion

New crate `teckel-server` wrapping `teckel-api` with an axum HTTP server
providing a concurrent, non-blocking job execution model.

Architecture:
- tokio::mpsc channel for job submission
- tokio::Semaphore-bounded worker pool (configurable concurrency)
- DashMap-based in-memory job store (thread-safe)
- CancellationToken per job for cooperative cancellation

Endpoints:
- GET  /api/health         — health check
- POST /api/validate       — synchronous YAML validation
- POST /api/explain        — synchronous execution plan
- POST /api/jobs           — submit pipeline (async, returns job_id)
- GET  /api/jobs           — list all jobs
- GET  /api/jobs/:id       — poll job status
- DELETE /api/jobs/:id     — cancel running/queued job

Job lifecycle: queued → running → completed | failed | cancelled

Configuration via environment variables:
- TECKEL_HOST (default: 0.0.0.0)
- TECKEL_PORT (default: 8080)
- TECKEL_MAX_CONCURRENCY (default: num_cpus)

CORS enabled for browser access from teckel-ui.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rafafrdz rafafrdz merged commit 3110308 into main Mar 27, 2026
2 checks passed
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