DBOS

DBOS
— by
INTO

With the increase of AI adoption and agents, workflow orchestration plays a vital role.

There are so many tools like Temporal and Airflow, which need complex setup.

There is a simple library that create durably workflows in your existing codebase and scale to a distributed setup

Its DBOS.


DBOS is a library for building reliable programs and durably executing workflows and making them resilient to any failure;

It’s built on top of Postgres.

This library is available in Python, TypeScript, Go, and Java.

Let’s look at a quick demo using a Node.js and express server

Start by installing dbos-sdk

npm install @dbos/dbos-sdk

Create an Express application.

Let’s create 2 steps that we want to run.

We are creating a example workflow where we run step 1 and step 2, waiting for 5 seconds

Let’s create a GET endpoint.

Let’s add a main function to bootstrap the application where we set up initial configuration for DBOS, where we pass the application name and a connection string to connect to the Postgres database

Let’s start the server; on server start it initlizaes the database schema

Now let’s do a curl request to the endpoint.

As you can see, all the steps in the workflow are completed.

Now let’s interrupt the server in between two steps

and restart the server; as you can see, it’s picking up step 2 and executing once the server is back.

If we check the PostgreSQL database, it creates a schema name dbos and all the tables required.

Follow us


Leave a Reply

Your email address will not be published. Required fields are marked *