Live data from Hacker News

Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

github.com

11–20 of 51 posts

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#11
Could you genericise the requirement in postgresql and provide a storage interface we could plug into? I think I have a use for this in Polykey (https://GitHub.com/MatrixAI/Polykey) but we use rocksdb (transactional key value embedded db).

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#12

Could you genericise the requirement in postgresql and provide a storage interface we could plug into? I think I have a use for this in Polykey ( https://GitHub.com/MatrixAI/Polykey ) but we use rocksdb (transactional key value embedded db).

Also this reminds me of orthogonal persistence https://wiki.c2.com/?TransparentPersistence

Did you do literature research of Smalltalk?

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#13

Hello! I'm a co-founder at DBOS here and I'm happy to answer any questions :)

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?

Nice catch. Fixing it :)

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#14

Hello! I'm a co-founder at DBOS here and I'm happy to answer any questions :)

FYI the “Build Crashproof Apps” button in your docs doesn’t do anything.

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 Built on Postgres

#15
post #9

Earlier quoted context omitted.

The state can be stored in any Postgres instance, either locally or in any cloud. For code, here's the bare minimum code example for a workflow: 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() } } The steps can be any TypeScript function. Then we have a bunch more exam…

Are there any constraints around which functions can be turned into steps? I assume their state (arguments?) need to be serializable? Also, what happens with versioning? What if I want to deploy new code?

Yeah, the arguments and return values of steps have to be serializable to JSON.

For versioning, each workflow is tagged with the code version that ran it, and we recommend recovering workflows on an executor running the same code version as what the workflow started on. Docs for self hosting: https://docs.dbos.dev/typescript/tutorials/development/self-.... In our hosted service (DBOS Cloud) this is all done automatically.

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#16
Loved the Supabase coverage from a month ago, showing under the hood what DBOS is storing & how the data flow works on it. It made real what DBOS was for me, clicked; before DBOS felt very abstract to me.

https://supabase.com/blog/durable-workflows-in-postgres-dbos https://news.ycombinator.com/item?id=42379974

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#17

Could you genericise the requirement in postgresql and provide a storage interface we could plug into? I think I have a use for this in Polykey ( https://GitHub.com/MatrixAI/Polykey ) but we use rocksdb (transactional key value embedded db).

That's definitely worth considering! The core algorithms can work with any data store. That said, we're focused on Postgres right now because of its incredible support and popularity.

Re: Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres

#19

Hello! I'm a co-founder at DBOS here and I'm happy to answer any questions :)

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 Built on Postgres

#20

Hello! I'm a co-founder at DBOS here and I'm happy to answer any questions :)

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?

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-...
Post reply on HN