News for hackers. Stuff that matters.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Thursday January 16, 2025 @12:35PM (#42728285)
Hello! I'm a co-founder at DBOS here and I'm happy to answer any questions :)
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by nahuel0x on Thursday January 16, 2025 @03:21PM (#42730392)
Can you change the workflow code for a running workflow that already advanced some steps? What support DBOS have for workflow evolution?
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by KraftyOne on Thursday January 16, 2025 @03:45PM (#42730665)
It's not recommended--the assumed model is that every workflow finishes on the code version it started. This is managed automatically in our hosted version (DBOS Cloud) and there's an API for self-hosting: https://docs.dbos.dev/typescript/tutorials/development/self-...

That said, we know sometimes you have to do surgery on a long-running workflow, and we're looking at adding better tooling for it. It's completely doable because all the state is stored in Postgres tables (https://docs.dbos.dev/explanations/system-tables).

Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by peterkelly on Thursday January 16, 2025 @02:35PM (#42729833)
How do you persist execution state? Does it hook into the Python interpreter to capture referenced variables/data structures etc, so they are available when the state needs to be restored?
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by KraftyOne on Thursday January 16, 2025 @02:40PM (#42729903)
That work is done by the decorators! They wrap around your functions and store the execution state of your workflows in Postgres, specifically:

- Which workflows are executing

- What their inputs were

- Which steps have completed

- What their outputs were

Here's a reference for the Postgres tables DBOS uses to manage that state: https://docs.dbos.dev/explanations/system-tables

Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by CMCDragonkai on Thursday January 16, 2025 @04:30PM (#42731140)
All of this seems it would fit any transactional key value structure.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by sarahdellysse on Thursday January 16, 2025 @01:00PM (#42728591)
Hi there, I think I might have found a typo in your example class in the github README. In the class's `workflow` method, shouldn't we be `await`-ing those steps?
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Thursday January 16, 2025 @01:11PM (#42728739)
Nice catch. Fixing it :)
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by mnembrini on Thursday January 16, 2025 @02:15PM (#42729596)
About workflow recovery: if I'm running multiple instance of my app that uses DBOS and they all crash, how do you divide the work of retrying pending workflows?
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Thursday January 16, 2025 @02:23PM (#42729688)
Each workflow is tagged by the executor ID that runs it. You can command each new executor to handle a subset of the pending workflows. This is done automatically on DBOS Cloud. Here's the self-hosting guide: https://docs.dbos.dev/typescript/tutorials/development/self-...
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by ilove196884 on Thursday January 16, 2025 @12:49PM (#42728445)
I know this this might sound scripted or can be considered cliche but what is the use case for DBOS.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Thursday January 16, 2025 @12:56PM (#42728531)
The main use case is to build reliable programs. For example, orchestrating long-running workflows, running cron jobs, and orchestrating AI agents with human-in-the-loop.

DBOS makes external asynchronous API calls reliable and crashproof, without needing to rely on an external orchestration service.

Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by Dinux on Thursday January 16, 2025 @01:20PM (#42728855)
Hai, really cool project! This is something I can actually use.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by gbuk2013 on Thursday January 16, 2025 @01:04PM (#42728634)
FYI the “Build Crashproof Apps” button in your docs doesn’t do anything.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Thursday January 16, 2025 @01:11PM (#42728751)
You'll need to click either the Python or TypeScript icon. We support both languages and will add more icons there.
Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by gbuk2013 on Thursday January 16, 2025 @11:28PM (#42734091)
Thanks the icons work!

I was originally looking at the docs to see if there was any information on multi-instance (horizontally scaled) apps. Is this supported? If so, how does that work?

Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by qianli_cs on Friday January 17, 2025 @12:47AM (#42734463)
Yeah, DBOS Cloud automatically (horizontally) scales your apps. For self-hosting, you can spin up multiple instances and connect them to the same Postgres database. For fan-out patterns, you may leverage DBOS Queues. This works because DBOS uses Postgres for coordination, rate limiting, and concurrency control. For example, you can enqueue tasks that are processed by multiple instances; DBOS makes sure that each task is dequeued by one instance.

Docs for Queues and Parallelism: https://docs.dbos.dev/typescript/tutorials/queue-tutorial

Re:Show HN: DBOS TypeScript – Lightweight Durable Execution ... by sitnik on Sunday January 19, 2025 @05:08PM (#42762495)
Hi! How does it perform under heavy load and with thousands of workflows trying to run concurrently since it relies on Postgres for a lot of things (including using a transaction)? In the end it seems that if I have an application with lots of distributed workers trying to run workflows, I'll still be limited by the CPU/memory of the DB.