4 ms·
Show HN: DBOS transact – Ultra-lightweight durable execution in Python
Hi HN - DBOS CEO here with the co-founders of DBOS, Peter (KraftyOne) and Qian (qianli_cs). The company started as a research project of Stanford and MIT, and Peter and Qian were advised by Mike Stonebreaker, the creator of Postgres, and Matei Zaharia, the creator of Spark. They believe so strongly in reliable, serverless compute that they started a company (with Mike) to bring it to the world!
Today we want to share our brand new Python library providing ultra-lightweight durable execution.
https://github.com/dbos-inc/dbos-transact-py https://github.com/dbos-inc/dbos-transact-py
Durable execution means your program is resilient to any failure. If it is ever interrupted or crashes, all your workflows will automatically resume from the last completed step. If you want to see durable execution in action, check out this demo app:
https://demo-widget-store.cloud.dbos.dev/ https://demo-widget-store.cloud.dbos.dev/
Or if you’re like me and want to skip straight to the Python decorators in action, here’s the demo app’s backend – an online store with reliability and correctness in just 200 LOC:
https://github.com/dbos-inc/dbos-demo-apps/blob/main/python/widget-store/widget_store/main.py https://github.com/dbos-inc/dbos-demo-apps/blob/main/python/...
Don't want to keep reading and just try it out:
https://console.dbos.dev/launch https://console.dbos.dev/launch
No matter how many times you try to crash it, it always resumes from exactly where it left off! And yes, that button really does crash the app.
Under the hood, this works by storing your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database. So all you need to use it is a Postgres database to connect to—there's no need for a "workflow server." This approach is also incredibly fast, for example 25x faster than AWS Step Functions.
Some more cool features include:
* Scheduled jobs—run your workflows exactly-once per time interval, no more need for cron.
* Exactly-once event processing—use workflows to process incoming events (for example, from a Kafka topic) exactly-once. No more need for complex code to avoid repeated processing
* Observability—all workflows automatically emit OpenTelemetry traces.
Docs: https://docs.dbos.dev/ https://docs.dbos.dev/
Examples: https://docs.dbos.dev/examples https://docs.dbos.dev/examples
We also have a webinar on Thursday where we will walk through the new library, you can sign up here: https://www.dbos.dev/webcast/dbos-transact-python https://www.dbos.dev/webcast/dbos-transact-python
We'd love to hear what you think! We’ll be in the comments for the rest of the day to answer any questions you may have.
- qianli_cs 2y agoHello! I’m here to answer any questions. I’d love to hear your feedback, comments, and anything!
- jedberg 2y agoHey all, I'm excited to be the new CEO of DBOS! I'm coming up on my one month anniversary. I joined because I truly believe DBOS is solving a lot of the main issues with serverless deployments. I still believe that Serverless is the way of the future for most applications and I'm excited to make it a reality. Ask me anything!
- quickvi 2y agoIs it possible not to use a PostgreSQL database? For example would it run with SQLite? The goal is to improve developer experience.
- qianli_cs 2y agoCo-founder here! No current plans to support SQLite. We picked Postgres because of its huge ecosystem--you can use DBOS with any PostgreSQL-compatible database (Supabase, Neon, Aurora, Cockroach...) and with any Postgres extension (here's an example app using pgvector: https://github.com/dbos-inc/dbos-demo-apps/tree/main/python/llamabot https://github.com/dbos-inc/dbos-demo-apps/tree/main/python/...)
- threecheese 2y ago(After a quick look at the code) Is this due to concurrency (writes)? It looks like this architecture supports multiple executors, and I would imagine you require transactional guards to ensure consistency. I really like this interface btw, the complexity is hidden very well and from reading your docs it remains accessible if you need to dig deeper than a decorator. And how the heck are you maintaining Typescript and Python copies? lol
- qianli_cs 2y agoThanks for your kind words! We're focusing on Postgres because an important scenario for durable execution is serverless computing, which won't work with an embedded database.