generated from john/python-template
1.0 KiB
1.0 KiB
ADR-0004: In-process worker topology for V1
- Status: accepted
- Date: 2026-06-25
Context
The current system uses an in-process background worker. Architecture docs allow this in foundation stage and permit later hardening (optional external worker/queue).
Decision
Retain in-process worker topology for V1, with improved lifecycle ownership:
- Worker starts/stops via app lifespan.
- Worker receives runtime-owned DB engine dependency explicitly.
- Extension path to external worker remains behind existing service/adapter seams.
Consequences
Positive
- Keeps operational complexity low for personal-scale use.
- Preserves delivery focus on V1 completion.
Tradeoffs
- Throughput/scaling limits remain compared to external queue-based topology.
Alternatives Considered
- Immediate queue/external worker introduction
- Rejected: premature complexity for current scale.
- Ad hoc thread lifecycle management outside lifespan
- Rejected: weaker shutdown guarantees and poorer ownership clarity.