Skip to main content

Why DBOS?

DBOS helps you write code that is reliable and fault-tolerant by default. DBOS durably executes your programs, so that if they fail, upon restart they automatically resume from where they left off. This makes all sorts of programs easier to write:

Write your business logic in normal code, with branches, loops, subtasks, and retries. DBOS makes it resilient to any failure.

See an example ↗️

@DBOS.workflow()
def checkout_workflow(items):
order = create_order()
reserve_inventory(order, items)
payment_status = process_payment(order, items)
if payment_status == 'paid':
fulfill_order(order)
else:
undo_reserve_inventory(order, items)
cancel_order(order)

Using DBOS

All you need to do to use DBOS is install the open-source DBOS Transact library (Python, TypeScript). To use the library, annotate workflows and steps in your program like this:

@DBOS.step()
def step_one():
...

@DBOS.step()
def step_two():
...

@DBOS.workflow()
def workflow()
step_one()
step_two()

If your program is ever interrupted or crashed, all your workflows automatically resume from the last completed step.

Under the hood, DBOS works by storing your program's execution state (e.g., which workflows are currently executing and which steps they've completed) in a Postgres database. So all DBOS needs to work is a Postgres database to connect to—there's no need for a separate "workflow server."

DBOS provides many powerful features you can use to build reliable programs, including:

  • Durable queues: Run many durable workflows in parallel, with controlled concurrency.
  • Durable sleeps and notifications: Workflows can wait for days or weeks, or for a notification, and will always resume on schedule.
  • Scheduled workflows: Start a workflow exactly-once per time interval.
  • Exactly-once event processing: Start a durable workflow exactly-once per incoming event, for example from Kafka.
  • Idempotency: Use built-in idempotency keys to start a workflow only once, no matter how many times it is called with that key.

DBOS Cloud

Any program you build with DBOS you can deploy for free to DBOS Cloud. You can deploy any program with a single command—no configuration required. Your program runs the same in the cloud as it does locally, but operating it is much simpler thanks to:

  • No servers to manage: We serverlessly deploy your applications for you.
  • Autoscaling: Your application automatically scales with load, potentially to millions of users.
  • Pay only for the CPU time you actually use: Pay only when you're using your app, and nothing at all for idle time.
  • Built-in observability: View your logs and traces and manage your application from the cloud console.

Get Started

What are you waiting for? Check out the quickstart to get started!