Better HN
topnewbestaskshowjobs
Log inSign up

qianli_cs

808 karma · joined Sep 3, 2022 (4y ago) · 129 submissions

Hi, I am Qian Li, co-founder at DBOS (durable execution library on Postgres, https://www.dbos.dev/). The way hardware, software, and data interact with each other appeals to me the most. Website: https://qianli.dev/
Submissions

1.

Transcript Testing: Helping Humans Verify AI Code(andrew.nerdnetworks.org ↗)

2 points · by qianli_cs · 1w ago · discuss

2.

Security Vocabulary for Maintainers(marcelotryle.com ↗)

2 points · by qianli_cs · 2w ago · discuss

3.

AlloyDB's Agentic Database Architecture(cloud.google.com ↗)

4 points · by qianli_cs · 2mo ago · discuss

4.

Postgres Select Distinct Does Not Scale(dbos.dev ↗)

4 points · by qianli_cs · 2mo ago · discuss

5.

PostgreSQL system catalog changes across versions(richyen.com ↗)

1 points · by qianli_cs · 2mo ago · discuss

6.

Fifty Years of Transaction Processing Research(arxiv.org ↗)

3 points · by qianli_cs · 6mo ago · discuss

7.

We ditched database triggers for audit logs(pydantic.dev ↗)

2 points · by qianli_cs · 6mo ago · discuss

comment 10mo ago · link · parent

That's fair, the idea itself isn't new. Workflows/durable execution have been around forever (same story in Elixir).

The differences are in the implementation and DX: the programming abstraction, how easy recovery/debugging is, and how it behaves once you're running a production cluster.

One thing that bit us early was versioning. In practice, you always end up with different workers running different code versions (rolling deploys, hotfixes, etc.). We spent a lot of time there and now support both workflow versioning and patching, so old executions can replay deterministically while still letting you evolve the code.

Curious how Oban handles versioning today?

comment 10mo ago · link · parent

Thanks for sharing, interesting project! One thing that stood out to me is that some fairly core features are gated behind a Pro tier. For context, there are prior projects in this space that implement similar ideas fully in OSS, especially around Postgres-backed durable execution:

1. DBOS built durable workflows and queues on top of Postgres (disclaimer: I'm a co-founder of DBOS), with some recent discussions here: https://news.ycombinator.com/item?id=44840693

2. Absurd explores a related design as well: https://news.ycombinator.com/item?id=45797228

Overall, it's encouraging to see more people converging on a database-centric approach to durable workflows instead of external orchestrators. There's still a lot of open design space around determinism, recovery semantics, and DX. I'm happy to learn from others experimenting here.

10.

The success of 'natural language programming'(brooker.co.za ↗)

4 points · by qianli_cs · 11mo ago · discuss

comment 11mo ago · link · parent

This post seems to be published in a hurry. Under "How it works" section a bunch of duplication, and I think they should make the blog post exactly once :) Excerpt from the blog post:

> During replay, your code runs from the beginning but skips over completed checkpoints, using stored results instead of re-executing completed operations. This replay mechanism ensures consistency while enabling long-running executions. > > ... During replay, your code runs from the beginning but skips over completed checkpoints, using stored results instead of re-executing completed operations. This replay mechanism ensures consistency while enabling long-running executions.

comment 1y ago · link · parent

I really enjoyed this post and love seeing more lightweight approaches! The deep dive on tradeoffs between different durable-execution approaches was great. For me, the most interesting part is that Persistasaurus (cool name btw) use of bytecode generation via ByteBuddy is a clever way to improve DX: it can transparently intercept step functions and capture execution state without requiring explicit API calls.

(Disclosure: I work on DBOS [1]) The author's point about the friction from explicit step wrappers is fair, as we don't use bytecode generation today, but we're actively exploring it to improve DX.

[1]: https://github.com/dbos-inc

comment 1y ago · link · parent

Yeah, in the long term, we're supporting more languages. But we aren't actively building new languages right now.

comment 1y ago · link · parent

To build on what Peter said, we need to stay focused and make one backend solid before expanding. But architecturally, nothing prevents us from supporting more engines going forward.

comment 1y ago · link · parent

I'm excited about this because durable workflows are really important for making AI applications production ready :) Disclaimer: I'm working on DBOS, a durable workflow library built on Postgres, which looks complementary to this.

I asked their main developer Dillon about the data/durability layer and also the compilation step. I wonder if adding a "DBOS World" will be feasible. That way, you get Postgres-backed durable workflows, queues, messaging, streams, etc all in one package, while the "use workflow" interface remains the same.

Here is the response from Dillon, and I hope it's useful for the discussion here:

> "The primary datastore is dynamodb and is designed to scale to support tens of thousands of v0 size tenants running hundreds of thousands of concurrent workflows and steps."

> "That being said, you don't need to use Vercel as a backend to use the workflow SDK - we have created a interface for anyone to implements called 'World' that you can use any tech stack for https://github.com/vercel/workflow/blob/main/packages/world/..."

> "you will require a compiler step as that's what picks up 'use workflow' and 'use step` and applies source transformations. The node.js run time limitations only apply to the outer wrapper function w/ `use workflow`"

16.

Finding my rhythm again(jeremydaly.com ↗)

67 points · by qianli_cs · 1y ago · 6 comments

comment 1y ago · link · parent

We're seeing issues with multiple AWS services https://health.aws.amazon.com/health/status

18.

Sanitized SQL(ardentperf.com ↗)

4 points · by qianli_cs · 1y ago · discuss

19.

Barbarians at the Gate: How AI Is Upending Systems Research(arxiv.org ↗)

8 points · by qianli_cs · 1y ago · discuss

20.

Supabase raises $100M at $5B valuation as vibe coding soars(fortune.com ↗)

3 points · by qianli_cs · 1y ago · discuss

comment 1y ago · link · parent

In DBOS, workflows can be invoked directly as normal function calls or enqueued. Direct calls don't require any polling. For queued workflows, each process runs a lightweight polling thread that checks for new work using `SELECT ... FOR UPDATE SKIP LOCKED` with exponential backoffs to prevent contentions, so many concurrent workers can poll efficiently. We recently wrote a blog post on durable workflows, queues, and optimizations: https://www.dbos.dev/blog/why-postgres-durable-execution

Throughput mainly comes down to database writes: executing a workflow = 2 writes (input + output), each step = 1 write. A single Postgres instance can typically handle thousands of writes per second, and a larger one can handle tens of thousands (or even more, depending on your workload size). If you need more capacity, you can shard your app across multiple Postgres servers.

comment 1y ago · link · parent

Good questions!

DBOS naturally scales to distributed environments, with many processes/servers per application and many applications running together. The key idea is to use the database concurrency control to coordinate multiple processes. [1]

When a DBOS workflow starts, it’s tagged with the version of the application process that launched it. This way, you can safely change workflow code without breaking existing ones. They'll continue running on the older version. As a result, rolling updates become easy and safe. [2]

[1] https://docs.dbos.dev/architecture#using-dbos-in-a-distribut...

[2] https://docs.dbos.dev/architecture#application-and-workflow-...

comment 1y ago · link · parent

I think one potential concern with "checkpoint execution state at every interaction with the outside world" is the size of the checkpoints. Allowing users to control the granularity by explicitly specifying the scope of each step seems like a more flexible model. For example, you can group multiple external interactions into a single step and only checkpoint the final result, avoiding the overhead of saving intermediate data. If you want finer granularity, you can instead declare each external interaction as its own step.

Plus, if the crash happens in the outside world (where you have no control), then checkpointing at finer granularity won't help.

comment 1y ago · link · parent

I think a clearer way to think about this is "at least once" message delivery plus idempotent workflow execution is effectively exactly-once event processing.

The DBOS workflow execution itself is idempotent (assume each step is idempotent). When DBOS starts a workflow, the "start" (workflow inputs) is durably logged first. If the app crashes, on restart, DBOS reloads from Postgres and resumes from the last completed step. Steps are checkpointed so they don't re-run once recorded.

comment 1y ago · link · parent

That password is only used by the GHA to start a local Postgres Docker container (https://github.com/dbos-inc/dbos-transact-golang/blob/main/c...), which is not accessible from outside.

26.

The Next Horizon of System Intelligence(sigops.org ↗)

2 points · by qianli_cs · 1y ago · discuss

comment 1y ago · link · parent

I think it was likely caused by the cache trying to compare the tag with Docker Hub: https://docs.docker.com/docker-hub/image-library/mirror/#wha...

> "When a pull is attempted with a tag, the Registry checks the remote to ensure if it has the latest version of the requested content. Otherwise, it fetches and caches the latest content."

So if the authentication service is down, it might also affect the caching service.

28.

Pydantic AI Durable Execution(ai.pydantic.dev ↗)

4 points · by qianli_cs · 1y ago · discuss

comment 1y ago · link · parent

The main advantage is the same architectural benefit DBOS provides in other languages: you only need to deploy your application, so there's no separate coordinator to run. All functionality (checkpointing, durable queues, notification/signaling, etc) is built directly into the Go package on top of the database.
12345