Summary
Outline and execute a safe, phased migration to a libevent-based orchestration layer in Spine. The near-term goal is improved timer/signal/process supervision reliability without rewriting all polling logic at once.
Work
- Define target architecture: single
libevent loop for orchestration + existing worker threads for blocking SNMP/DB operations.
- Add configure/build detection for
libevent and keep non-libevent build path available.
- Implement migration in phases:
- Phase 1: bootstrap event loop lifecycle (startup/shutdown/error paths).
- Phase 2: migrate timers and signal handling to
libevent primitives.
- Phase 3: move child-process supervision (timeouts/output caps/cleanup) under event-loop control.
- Phase 4: integrate queue wakeups/notifications between worker threads and event loop.
- Phase 5: evaluate optional async conversions where dependencies support it; keep blocking paths isolated until proven safe.
- Add feature gating so rollout can be enabled incrementally.
- Add regression/perf validation for poll cycle correctness, timeout behavior, and shutdown determinism.
- Update operator/developer docs with architecture and rollout guidance.
Acceptance Criteria
- Spine builds and runs both with and without
libevent support.
- Event-loop path preserves existing poll results and failure semantics.
- Timer/signal/child-process handling is centralized in the event loop and verified by tests.
- Rollout is gated and reversible without code rollback.
- Documentation describes architecture, flags, and migration/rollback steps.
Summary
Outline and execute a safe, phased migration to a
libevent-based orchestration layer in Spine. The near-term goal is improved timer/signal/process supervision reliability without rewriting all polling logic at once.Work
libeventloop for orchestration + existing worker threads for blocking SNMP/DB operations.libeventand keep non-libevent build path available.libeventprimitives.Acceptance Criteria
libeventsupport.