New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dbos-inc/dbos-sdk

Package Overview
Dependencies
Maintainers
0
Versions
361
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dbos-inc/dbos-sdk

A Typescript framework built on the database

  • 2.3.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

DBOS Transact: A Lightweight Durable Execution Library Built on Postgres

Documentation   •   Examples   •   Github   •   Discord

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. Under the hood, those decorators store your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database. If your program crashes or is interrupted, they automatically recover its workflows from their stored state. So all you need to use DBOS is Postgres—there are no other dependencies you have to manage, no separate workflow server.

One big advantage of this approach is that you can add DBOS to any TypeScript application—it’s just a library. For example, you can use DBOS to add reliable background jobs or cron scheduling or queues to your Next.js app with no external dependencies except Postgres.

Getting Started

Initialize a starter app with:

npx @dbos-inc/create -t dbos-node-starter

Or, if you want to use the integration with Next.js:

npx @dbos-inc/create -t dbos-nextjs-starter

Then build and run your app with:

npm install
npm run build
npm run start

Visit your app in your browser at localhost:3000 to see durable execution in action!

To learn how to build more complex workflows, check out the programming guide or docs.

Documentation

https://docs.dbos.dev

Community

If you're interested in building with us, please star our repository and join our community on Discord! If you see a bug or have a feature request, don't hesitate to open an issue here on GitHub. If you're interested in contributing, check out our contributions guide.

FAQs

Package last updated on 10 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc