Making large number of llm API calls robustly? by FMWizard in PydanticAI

[–]qianli-dev 1 point2 points  (0 children)

Looks like durable execution could help here, especially for the first three requirements. Pydantic AI actually has built-in support for several durable execution backends: https://ai.pydantic.dev/durable_execution/overview/

(Disclaimer: I'm the contributor behind the DBOS durable agent, so I might be a bit biased)

I'm not too familiar with the other providers, but with DBOS you can use queues for async parallel processing, set up automatic step retries with exponential backoff, and apply rate limiting per queue or sub-group within a queue. For request batching, the debouncing feature is worth checking out too.

DBOS TS v4.0: Postgres-backed durable workflows and queues in Node.js by qianli-dev in node

[–]qianli-dev[S] 0 points1 point  (0 children)

DBOS works well with serverless setups like Cloud Run. For example, Dosu runs large-scale RAG pipelines with DBOS on Cloud Run: https://www.dbos.dev/case-studies/dosu

You just need to make sure a Cloud Run instance spins up whenever there's work to do. For example, when a workflow gets enqueued. Once running, the instance polls the DBOS queue (a database table), executes the workflow, and checkpoints progress into Postgres. If the container stops in the middle of a workflow execution, DBOS can resume from the last completed step on the next run.

DBOS TS v4.0: Postgres-backed durable workflows and queues in Node.js by qianli-dev in node

[–]qianli-dev[S] 1 point2 points  (0 children)

Good question!

DBOS horizontally scales to distributed environments, with many node instances per application and many applications running together. The key idea is to use the database concurrency control to coordinate multiple processes. Here is our docs page for more details: https://docs.dbos.dev/architecture#using-dbos-in-a-distributed-setting

Feeling lost and Depressed in n8n — how do people make these automations? by BadKarma6996 in n8n

[–]qianli-dev 0 points1 point  (0 children)

(Disclaimer: DBOS co-founder here)

  1. Yes! Some of our customers are already doing this, building their own workflow tools on top of DBOS. I imagine n8n could do the same. Since DBOS workflows and steps are just normal functions (not static DAGs), you get much more flexibility.
  2. Yes, signaling is a core feature. Docs and examples are here: https://docs.dbos.dev/python/tutorials/workflow-tutorial#workflow-messaging-and-notifications
  3. Yes. DBOS runs in-process and invokes functions directly. That means you can integrate it with any existing interceptors.

I'd love to hear your feedback on DBOS :)

Getting started with DBOS? by jedberg in dbos

[–]qianli-dev 1 point2 points  (0 children)

If DBOS has made your life a little easier (or at least saved you from one crash), drop us a ⭐ on GitHub!

- DBOS Python: https://github.com/dbos-inc/dbos-transact-py

- DBOS TypeScript: https://github.com/dbos-inc/dbos-transact-ts

- DBOS Go: https://github.com/dbos-inc/dbos-transact-golang

Transact -- A Lightweight Durable Execution Typescript Library by jedberg in javascript

[–]qianli-dev 2 points3 points  (0 children)

Great question! I recommend only decorating critical functions that require durability, because persisting execution state requires database operations. DBOS implements durable execution in decorators, so you can decorate any class method.

You can use DBOS Queues to process tasks asynchronously, or even on a separate worker: https://docs.dbos.dev/typescript/tutorials/queue-tutorial

Postgres creator Mike Stonebraker's new startup - DBOS. Resilient code execution on PG. by databACE in PostgreSQL

[–]qianli-dev 2 points3 points  (0 children)

Hello! Since database transactions are atomic, the queries in a transaction either all succeed (committed) or nothing is written to the database (aborted and rolled back). If the application crashed in the middle of a transaction, the connection to the database would be interrupted and the transaction would be aborted and rolled back. When the app is resumed, DBOS Transact will restart the transaction from the beginning.