Skip to content

DurableStateRecord

Defined in: src/persistence/DurableStateStore.ts:13

Storage contract for Durable State — the “event-free” cousin of Event Sourcing. Instead of appending events that are replayed, a Durable State actor overwrites a single snapshot per persistence id. This trades off the audit log for simpler implementation and faster recovery.

Revision is a monotonic counter used for optimistic concurrency: writes must pass the expected previous revision or they fail.

S

readonly persistenceId: string

Defined in: src/persistence/DurableStateStore.ts:14


readonly revision: number

Defined in: src/persistence/DurableStateStore.ts:15


readonly state: S

Defined in: src/persistence/DurableStateStore.ts:16


readonly timestamp: number

Defined in: src/persistence/DurableStateStore.ts:17