DBOS Transact is a TypeScript library for ultra-lightweight durable execution.
For example:
class Example { @DBOS.step() static async step_one() { ... } @DBOS.step() static async step_two() { ... } @DBOS.workflow() static async workflow() { await Example.step_one() await Example.step_two() } }
Durable execution means persisting the execution state of your program while it runs, so if it is ever interrupted or crashes, it automatically resumes from where it left off.
Durable execution helps solve many common problems:
- Orchestrating long-running or business-critical workflows so they seamlessly recover from any failure.
- Running reliable background jobs with no timeouts.
- Processing incoming events (e.g. from Kafka) exactly once.
- Running a fault-tolerant distributed task queue.
- Running a reliable cron scheduler.
- Operating an AI agent, or anything that connects to an unreliable or non-deterministic API.
What’s unique about DBOS’s implementation of durable execution is that it’s implemented in a lightweight library that’s totally backed by Postgres.
To use DBOS, just npm install
it and annotate your program with DBOS decorators.