Durable Actor
Session Protocol
A server protocol for durable actors.
The connection can end. The work can continue. Discover what an actor offers, send commands, read saved outcomes, and return to the same actor session.
Capability discovery
Learn before
you open.
An optional setup contract reveals the actor’s exact profile and a bounded view of its commands. A large actor returns stable summary pages. The client reads details and schema resources only for the commands it needs.
Discovery describes commands. It does not authorize them.
Follow discovery- 1
SelectAuthenticate one exact discovery mapping.
- 2
ListRead bounded summaries from one stable snapshot.
- 3
InspectRequest selected details and exact schema resources.
- 4
ConfirmConfirm the profile, binding, extensions, and limits.
- 5
OpenAssert the profile and start the durable session.
Use the durable session
After setup, five core operations connect your client to the actor’s saved record.
Inspect the messages| Purpose | Request | Reply |
|---|---|---|
| Open or return to a session | session.open | session.opened |
| Ask the actor to do work | command | receipt |
| Read current saved state | view.read | view |
| Read missed events | updates.read | updates |
| Check a command's result | outcome.read | outcome |
Command admission
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 messagesStable command IDcmd-042
ClientSubmit a commandKeep its ID and data for retries.
ServerSave admissionThen return an accepted receipt.
ServerSave the outcomeCompleted · failed · cancelled · uncertain
Progress is temporary. The outcome is saved.
Connection recovery
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 rulesShared sessions
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 sessionsCommon rules.
Native clients.
Choose Elixir or TypeScript. Both use the same messages and recovery rules. Elixir includes a WebSocket client. TypeScript accepts your transport. Your application supplies authenticated setup, profile rules, and durable storage.
Read the specification