Architect continuous polling mode for run_projection API #276

Closed
opened 2026-01-01 07:50:56 -08:00 by jwilger · 1 comment
jwilger commented 2026-01-01 07:50:56 -08:00 (Migrated from github.com)

Context

During the ADR-030 layered API cleanup, we removed PollMode::Continuous as dead code because it wasn't accessible through the public run_projection() API. However, continuous polling is a legitimate use case for long-running projection processes that need to:

  • Poll for new events indefinitely
  • Pause between polls (with configurable backoff when no events found)
  • Keep projections up-to-date in real-time

Problem

The current run_projection() API only supports batch mode - it processes available events once and exits. There's no public API for continuous polling.

Deliverables

  1. ADR documenting the design decision for how continuous polling should be exposed through the public API
  2. Updated ARCHITECTURE.md reflecting the chosen approach
  3. Implementation ticket(s) for the actual work

Design Considerations

  • Should continuous mode be a separate function (run_projection_continuous())?
  • Should it be configured via the Projector trait?
  • Should it be configured via the backend?
  • How should shutdown/cancellation work?
  • What configuration options are needed (poll interval, empty poll backoff)?
## Context During the ADR-030 layered API cleanup, we removed `PollMode::Continuous` as dead code because it wasn't accessible through the public `run_projection()` API. However, continuous polling is a legitimate use case for long-running projection processes that need to: - Poll for new events indefinitely - Pause between polls (with configurable backoff when no events found) - Keep projections up-to-date in real-time ## Problem The current `run_projection()` API only supports batch mode - it processes available events once and exits. There's no public API for continuous polling. ## Deliverables 1. **ADR** documenting the design decision for how continuous polling should be exposed through the public API 2. **Updated ARCHITECTURE.md** reflecting the chosen approach 3. **Implementation ticket(s)** for the actual work ## Design Considerations - Should continuous mode be a separate function (`run_projection_continuous()`)? - Should it be configured via the `Projector` trait? - Should it be configured via the backend? - How should shutdown/cancellation work? - What configuration options are needed (poll interval, empty poll backoff)?
jwilger-ai-bot commented 2026-04-11 17:15:11 -07:00 (Migrated from github.com)

Completed in #345 — ADR-0036 documents ProjectionRunner as the public API for continuous polling mode.

Completed in #345 — ADR-0036 documents ProjectionRunner as the public API for continuous polling mode.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jwilger/eventcore#276
No description provided.