| ▲ | aynyc 6 hours ago | |
OK. I've read it a few times and still don't understand. Where is the distributed part? You store data in a single transaction into postgres. What/who is notifying the message queue? | ||
| ▲ | KraftyOne 6 hours ago | parent | next [-] | |
You build a distributed system on top of this! For example, you may have many distributed workers durably executing workflows from the Postgres-backed task queue. The Postgres transactions allow you to atomically perform operations spanning both your task queue and your business data. Here's another blog post about how a Postgres-backed task queue can run at scale: https://www.dbos.dev/blog/making-postgres-queues-scale | ||
| ▲ | hoppp 6 hours ago | parent | prev [-] | |
I've been writing distributed workers for ages with stored functions that have a SELECT FOR UPDATE query. When workers query the db for jobs the rows get locked by the select and there are no race conditions or duplicate assigned jobs | ||