Skip to content

Infrastructure: Replace wsgiref with a Production-Grade ASGI Server #13

Description

@hypnoastic

Description

The monitoring backend currently relies on wsgiref.simple_server.make_server (in autoweave/monitoring/web.py) to serve the UI and the API. wsgiref is a built-in Python module intended strictly for local development and testing; it is single-threaded, blocks on network I/O, and cannot handle concurrent connections efficiently.

Proposal

Migrate the backend from a raw WSGI wsgiref implementation to a modern, production-grade ASGI framework (like FastAPI running on Uvicorn).

Acceptance Criteria

  • Refactor autoweave/monitoring/web.py to use FastAPI.
  • Update the CLI entrypoint to launch via Uvicorn.
  • Ensure backwards compatibility with the existing /api/state and /api/run endpoints.
  • This will also unlock the ability to implement WebSockets (Issue Feature: Implement WebSockets or SSE for Real-Time UI Updates #9) seamlessly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions