Skip to content

Durable Actor
Session Protocol

A server protocol for durable actors.

The connection can end. The work can continue. Send commands, read saved outcomes, and return to the same actor session.

Clients connect through a DASP server.
Web appCLIServiceDASP serverSessions · commands · historyWorkflowactorDeviceactorAgentactor

How DASP works

Five operations connect your client to the actor’s saved record.

Inspect the messages
Five client operations · short message names
PurposeRequestReply
Open or return to a sessionsession.opensession.opened
Ask the actor to do workcommandreceipt
Read current saved stateview.readview
Read missed eventsupdates.readupdates
Check a command's resultoutcome.readoutcome

Know what
the server saved.

The server saves acceptance before replying. It records the final outcome separately. If effects cannot be established, the outcome is uncertain.

Understand the messages
From client intent to a saved outcome.
Stable command IDcmd-042
  1. ClientSubmit a commandKeep its ID and data for retries.
  2. ServerSave admissionThen return an accepted receipt.
  3. ServerSave the outcomeCompleted · failed · cancelled · uncertain

Progress is temporary. The outcome is saved.

Resume after the last applied update.
Before disconnectAfter reconnectCursor: 2Read after 2DASP server · saved session history12345Applied through 2Replay 3–5

Reconnect to
the same record.

The server retains ordered updates when a connection ends. A returning client reads after the last update it applied.

Read the recovery rules

Many clients.
One shared session.

A web app, command-line tool, and service can use the same actor session. The server checks access and gives each client the same ordered history.

Understand shared sessions
One history. A position for each client.
DASP serverOne actor session · saved updates12345Same order for every clientWeb appCursor: 5CLICursor: 3ServiceCursor: 4

Common rules.
Native clients.

Choose Elixir or TypeScript. Both use the same messages and recovery rules. Your application supplies transport and storage.

Read the specification