Skip to main content

Dex vs. Other Engines

View as Markdown

This page maps Dex to durable execution tools other than Temporal: journal-based runtimes, database-backed libraries, step function services, and agent framework checkpoints. Dex vs. Temporal covers Temporal.

Replay-based engines. Cadence uses the same replay model as Temporal, so the Temporal comparison also applies to Cadence.

Journal-based runtimes

Restate is an example. A handler runs each side effect through the runtime context, which records the result in a journal. After a failure, the handler runs again and gets the recorded results. A virtual object holds state under a key with one writer per key.

RestateDex
Workflow, service handlerFlow
Journaled action (ctx.run)Step Execute
Virtual object and its keyA long-lived Flow per key, with the key as the Flow ID. A closed Flow is deleted after its retention period, while a virtual object persists.
Object stateAttributes
Awakeable or durable promiseA Channel message that a Step waits for
Durable sleepTimer

Handler code between journaled calls must be deterministic, because it runs again. Restate deduplicates invocations by idempotency key. Dex deduplicates Flow starts by Flow ID and request ID.

Database-backed libraries

DBOS is an example. Workflows and steps are annotated functions in your application. DBOS checkpoints them in your PostgreSQL database and adds no other server. The workflow function must be deterministic between steps. DBOS send takes an idempotency key.

DBOSDex
Workflow, Workflow IDFlow, Flow ID
StepStep Execute
Send and receiveChannel
EventsAttributes, read by RPC
QueueTask queue. Each Worker's task slots bound its work.

Dex runs its own server on object storage and can copy Attribute values to your database with Attribute Store sync.

When Restate or DBOS fits better

  • Your process is one short function in one service, and you already run PostgreSQL. A database-backed library adds no new server.
  • You want one writer per key with no locks to declare. A Restate virtual object gives that by default. In Dex you declare Attribute locks.

Step function services

AWS Step Functions is an example: a state machine in a JSON definition language, with each state calling a service. Both record an explicit graph of states. Dex Steps and decisions are code in your language. They run on your Workers, so a Step can call any library.

Agent framework checkpoints

LangGraph is an example. A checkpointer saves graph state after each node under a thread ID, and an interrupt pauses the graph for human input. The checkpointer only saves state. Resuming a crashed run or waking it on a timer requires a hosted platform or custom code. Dex Server does both for every session.

Agent frameworkDex
Thread IDSession ID, which is the Flow ID
CheckpointThe session's Attributes after each model call or tool call
Interrupt for human inputA tool call waiting for approval, or a question

With Durable Agents, you keep your framework. The adapter wraps the agent in a session Flow.

Agent frameworks on a durable execution engine

The OpenAI Agents SDK on Temporal, Pydantic AI on Temporal, DBOS, or Prefect, and the LangGraph platform record each model call and wrapped tool call as a unit of the engine. After a crash, only the in-progress call runs again. Dex adds two capabilities:

  • Each tool has an effect class. A read may run again. A non-idempotent write runs in one attempt by default. If it is interrupted, the model receives outcome_unknown. See Tool Calls.
  • The effect class also sets the default approval. An approval wait holds no Worker, for minutes or days. See Approvals.

Next

  • Performance: measured throughput and latency for one Dex node.
  • Limits: what can surprise a team that runs Dex in production.
  • Durable Agents: keep your agent framework and run it on Dex.