Browse documentation

Explanation

Durable execution

What the runtime retains, how storage backends differ, and what recovery guarantees require.

Durable execution retains state and progress so a later process can resume supported work. Actors preserve state; workflows preserve supported continuations and waits. Recorded effect outcomes supply inputs needed by recovery and replay.

The execution model does not require a particular directory layout. It requires storage that preserves the runtime’s rules for accepting progress, recording effects and recovering work. The current local runner implements that storage using a filesystem-backed node.

Storage is part of the runtime

Runtime storage retains the history, saved state, pending work and exact code needed to continue an execution. Keeping only the latest actor value is not enough: the runtime must also know how that value was reached, which operation is outstanding and which version of the code should resume it.

Septa has a Store interface separating execution from the underlying storage implementation. Its implemented modes include a local append log, SQLite and memory. The current CLI does not offer these as interchangeable settings.

What the local state directory means

The current local runner opens a SQLite-backed runtime store beneath the directory supplied with --state. The directory also holds retained executables and supporting node files, including identity and writer-lock information.

The path and layout are local-host details. They still matter operationally today: replacing the database alone does not replace the host’s code retention, identity, request handling and writer ownership. The CLI cannot switch to S3 or memory just by changing --state.

A backup or recovery procedure must preserve the required history, saved values, retained code and identity material consistently. The latest value printed by an inspection command is not a complete backup.

The counter tutorial creates, updates and reads one actor using separate processes. It demonstrates reopening between commands, not a crash at every write boundary or loss of storage.

Could another storage backend be used?

Yes, a different host and backend could implement the same execution contract. It must do more than save and load serialized state.

A conforming backend must preserve, among other rules:

  • One accepted next step: competing attempts cannot both advance the same run revision.
  • Correct effect answers: an answer must match the exact outstanding command and expected schema, and be consumed once.
  • Recoverable progress: acknowledged durable progress must remain recoverable with its required snapshots, history and code.
  • Safe boundary effects: operations classified as crossing the runtime’s boundary must wait until their required history is durable. Internal and control operations do not use that same gate.
  • Authority and provenance: storage must preserve tenant boundaries, recorded decisions and quarantine rules. A stored hash alone does not grant permission.

Changing the backend requires implementation and failure testing against those rules. A faster implementation can preserve them, but acknowledging work before it is recoverable changes the guarantee. Performance needs to be measured under the same durability settings.

Storage choice What it means today
Current local CLI SQLite runtime storage plus supporting files in a local state directory
Local append-log mode An implemented runtime storage mode; not a backend selector exposed by the current CLI
In-memory mode An implemented store for tests and simulation, with no durability claim
S3-compatible application blobs A supported object-storage integration for application data; separate from the runtime history store
S3-backed primary runtime store A possible backend design, not an implemented selectable backend in the current CLI
Shared database backend Present in the reference architecture; the Postgres implementation is deferred beyond the first-release scope

What changes with in-memory storage?

Memory storage supports the execution model and repeatable tests while the process owns the data. It does not survive process loss. Septa’s memory mode explicitly declares no durability and refuses operations that require a durability guarantee it cannot provide.

A test can export and reload an in-memory store to exercise reconstruction. That does not demonstrate survival of a machine crash.

Use memory to test logic and recovery code under controlled inputs. Use a qualified persistent backend when the application must resume after a process or machine failure.

Could S3-compatible storage replace the directory?

It could be part of such a design, but it is not a direct directory substitution.

An object store can hold snapshots, code artifacts and immutable history segments. To use it as the authoritative runtime store, a backend would also need a commit and writer-ownership protocol that satisfies the rules above. Mounting a bucket as a filesystem does not establish those guarantees.

Amazon S3 supports strongly consistent object reads and writes, atomic replacement of an individual object, and conditional writes. These are useful building blocks, but updates across multiple object keys are not automatically one transaction. An S3-backed runtime would need to define how a complete step becomes committed and recoverable. Other S3-compatible providers need their own conformance checks. See S3 consistency and conditional writes.

Septa already has an S3-compatible blob capability for application objects. Configuring it does not move actor history, continuations or retained runtime code into S3.

There is also an object-backed replication design in which the local log remains authoritative and uploaded data supports recovery. That is a different design from committing every runtime step directly to S3. Neither the blob adapter nor the replication design establishes a production S3 backend for all runtime state.

Would this work the same in Septa Cloud?

A future hosted service could preserve the same supported actor, effect and durable-execution model while managing storage differently. Application logic would not need to know the host’s directory layout. The hosted runtime would provide the required persistence, retained code, effect adapters and authority configuration.

That does not make every deployment guarantee identical. A local persistent store can support process recovery without surviving loss of its disk. A replicated service could offer stronger recovery, but only if its commit, replication and failover behavior support that claim. Recovery from an asynchronously copied log is limited by what reached the remote copy.

For cloud and local execution to be comparable, they would need compatible runtime and code identities, supported capabilities and explicit durability settings. Latency, credentials, quotas, data location and failure behavior can differ even when the application uses the same programming model.

Septa Cloud is not currently available. This describes how a future host could work, not a delivered service. See release scope.

External outcomes can be uncertain

A provider may accept a payment before the connection fails. The runtime cannot infer that outcome from silence, whether its own storage is local or remote.

The adapter needs the provider’s idempotency or reconciliation contract. Retain the business request identity and distinguish an ambiguous result from a confirmed refusal. See external effects.

Existing state needs compatible code

A source edit does not reinterpret saved state. Schema changes need a compatibility decision and, where required, a conversion or migration.

In-flight work is also tied to the code that accepted it. Selecting a new candidate in a watch loop does not authorize arbitrary migration of existing operations. See the development workflow.

Search concepts, guides and reference.