Skip to content

Durable long-running jobs: consider Temporal (or org standard) for multi-day stream windows #139

@greatest0fallt1me

Description

@greatest0fallt1me

Spike: Temporal/Step Functions for long-lived streaming schedules and child workflows

    ## Description

    **Spike** whether **durable** workflow engines (**Temporal**, AWS SFW, or org standard) fit

multi-day or monthly stream accrual with Soroban settlement, better than
pure cron+queue. Output is an ADR with build vs not-build recommendation, not
production roll-out in 96h unless trivially adopted.

    ## Requirements and context

    - **Prototype** 2 flows: `sleep-until` next tick, **child** workflow per stream.
  • Cost and operational comparison vs current BullMQ (from existing issues) + cron.

  • Security of worker identity and secrets; network egress controls.

  • ADRs in docs/adr/.

  • If rejected, document risks of staying on cron (missed tick, idempotency).

      ## Suggested execution
    
      1. `git checkout -b spike/temporal-streams`
    
  1. Timebox 3 days; do not block release train on the spike.

  2. PR with ADR, no need for 95% test coverage (spike) but include tests for any code merged.

  3. Guidelines on timeframe: 96h to ADR+prototype branch; mark issue done when merged.

  4. Child issue for production if approved.

     ## Test and commit
    
  • Run the full test suite; add or update tests until the agreed coverage bar is met.
  • Cover edge cases listed in this issue; document any intentional exclusions with brief rationale in the PR.
  • Include relevant test output (e.g. test runner summary) or a link to a passing CI run in the pull request.
  • Add security notes for auth, keys, PII, chain settlement, or money movement (assumptions verified, out-of-scope items).

Example commit message

docs(adr): spike Temporal (or org equivalent) for long-lived stream and Soroban workflows

Guidelines

  • Target: at least 95% coverage on new or meaningfully changed code (per the repo’s standard tooling).
  • Documentation: update contributor-facing or API documentation where a reviewer would be blocked without it.
  • Timeframe: 96 hours to ready-for-review (surface blockers early).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureStreamPay ghit: area-infrastructuredomain-workersStreamPay ghit: domain-workerspriority-p3StreamPay ghit: priority-p3type-architectureStreamPay ghit: type-architecture

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions