Skip to content

Docs: DO-0 add Dara stateless mode proposal#625

Draft
krzysztof-causalens wants to merge 12 commits into
masterfrom
codex/stateless-mode-proposal
Draft

Docs: DO-0 add Dara stateless mode proposal#625
krzysztof-causalens wants to merge 12 commits into
masterfrom
codex/stateless-mode-proposal

Conversation

@krzysztof-causalens
Copy link
Copy Markdown
Collaborator

Motivation and Context

Dara's current runtime assumes a single process owns local registries, websocket channels, task state, backend-store sequence numbers, and frontend-visible random IDs. That makes horizontal scaling beyond sticky sessions difficult and leaves the path to true stateless deployments unclear.

This PR does not change runtime behavior. It adds an internal proposal document to capture a concrete staged direction for moving Dara toward distributed-safe and eventually stateless operation.

The proposal covers:

  • sticky-session scaling as the near-term operational baseline
  • shared runtime backends and a websocket backplane
  • off / warn / enforce distributed modes
  • serialized static kwargs and typed deserialization contracts
  • lifecycle-based rejection of runtime-created distributed definitions
  • distributed task queue/result handling
  • ServerVariable behavior with non-local backends
  • stable identity, build-time manifests, and deployment-scoped manifest fingerprints
  • browser value-read compatibility boundaries
  • Dara v2 defaulting to distributed-safe behavior with unsafe_runtime_mode="local" as an escape hatch

Implementation Description

Added a draft internal proposal at docs-internal/proposals/dara-stateless-mode.md.

The proposal is intentionally opinionated about the major architectural choices while leaving the final implementation details to later design and code review. It records the decisions reached around websocket routing, backend adapter shape, stable identity, manifest validation, task execution, and v2 compatibility.

Any new dependencies Introduced

None.

How Has This Been Tested?

  • Reviewed the proposal content in-repo.
  • No runtime tests were run because this PR only adds an internal proposal document.

PR Checklist:

  • I have implemented all requirements? (see JIRA, project documentation).
  • I am not affecting someone else's work, If I am, they are included as a reviewer.
  • I have added relevant tests (unit, integration or regression).
  • I have added comments to all the bits that are hard to follow.
  • I have added/updated Documentation.
  • I have updated the appropriate changelog with a line for my changes.

Screenshots (if appropriate):

N/A

@krzysztof-causalens krzysztof-causalens self-assigned this Apr 21, 2026
Comment thread docs-internal/proposals/dara-stateless-mode.md
Comment thread docs-internal/proposals/dara-stateless-mode.md
Comment thread docs-internal/proposals/dara-stateless-mode.md Outdated
Comment thread docs-internal/proposals/dara-stateless-mode.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant