Live data from Hacker News

SQLite is all you need for durable workflows

obeli.sk

371–380 of 413 posts

Re: SQLite is all you need for durable workflows

#371
post #196

Earlier quoted context omitted.

there is a difference between concurrency in a distributed environment and concurrency on a single machine across processes. SQLite is incredibly useful for the latter. you seem like the inexperienced one to me..

SQLite does not support concurrent writes at all (on a single machine), a single writer process locks the entire database.

It doesn't block reads. Single writer systems are often faster than concurrent writers no coordination overhead and you can batch.

Re: SQLite is all you need for durable workflows

#372
post #22

I don't understand this obsession with SQLite for real, production apps. SQLite is an embedded database, completely unsuitable for managing concurrency. This is what database _servers_ are for, e.g., Postgres, MySQL, etc. Their entire job is to allow you to modify data from multiple processes, on different machines, at the same time. This is a foundational principle of computer science. It seems to me that the "SQLit…

SQLite also gets really slow at around 50 million rows.

Seems fine at billions of rows in my experience.

Re: SQLite is all you need for durable workflows

#373
post #74

Earlier quoted context omitted.

Imagine if every tweet had to go through a one-at-a-time queue before being persisted. There's about 6000 tweets per second, so you would have to be able to save them at <0.17ms per tweet or else you would become backlogged. If you are getting backlogged, you have to buffer those incoming tweets somewhere until they can be writted, and eventually that buffer gets full and you start losing tweets.

Sqlite can quite easily do 5000+ insert+commits per second on typical NVMe drives. Speed is rarely the constraint that makes it unsuitable for an application.

You mean 100k+ right?

Re: SQLite is all you need for durable workflows

#374
post #22

I don't understand this obsession with SQLite for real, production apps. SQLite is an embedded database, completely unsuitable for managing concurrency. This is what database _servers_ are for, e.g., Postgres, MySQL, etc. Their entire job is to allow you to modify data from multiple processes, on different machines, at the same time. This is a foundational principle of computer science. It seems to me that the "SQLit…

And I don't understand the obsession with server-based databases for single apps. Especially in containerised setups, every "app" gets its own database anyways, and if the app is further broken down into services, they usually communicate between each other and not with a shared database. So in those cases, what do you gain by pulling the database out of the "process" and onto the other end of a socket? In most cases…

How do you do server maintenance or handle hardware failure if your database is SQLite? You are going to have to take downtime, even in the best scenario.

Re: SQLite is all you need for durable workflows

#375
post #58
post #22

I don't understand this obsession with SQLite for real, production apps. SQLite is an embedded database, completely unsuitable for managing concurrency. This is what database _servers_ are for, e.g., Postgres, MySQL, etc. Their entire job is to allow you to modify data from multiple processes, on different machines, at the same time. This is a foundational principle of computer science. It seems to me that the "SQLit…

There are many cases where SQLite + concurrent front end (like a go net/http server) can handle all the load that a service might ever conceivably have to handle, especially if allowed to scale up hardware over time. You can trivially scale up SQLite to, what, hundreds of thousands of tps? The only thing you really give up is HA/failover and DR. But there are solutions to deal with those. And single-server systems ar…

You also have the issue or normal maintenance (patching, OS upgrades, etc). You can’t do those without downtime if you are using SQLite.

Re: SQLite is all you need for durable workflows

#377

Earlier quoted context omitted.

…and iOS, and Windows, and Mac OS, and Boeing, and Sony, and Firefox and Chrome and Safari…

Yes, which goes in line with the argument that claiming that it's "the most deployed" as proof of superiority or suitability for any use case is equivalent to claiming the same for Internet Explorer. It's the most deployed because it's bundled in a lot of systems, not because people are purposefully using it as a DBMS.

But it doesn't, because none of those systems are presenting SQLite to the user as something they should be using; they don't even make SQLite available to the user at all. Those systems all use SQLite internally to manage data.

Re: SQLite is all you need for durable workflows

#378
The move toward local-first, durable workflows is honestly a breath of fresh air. I’ve spent the last few months building a document analysis tool and the amount of friction involved in trying to make cloud-based RAG pipelines 'durable' vs just keeping the state in local SQLite is night and day. Once you stop fighting the latency and privacy issues of the cloud you can build much faster.

Re: SQLite is all you need for durable workflows

#379

The cycle of expertise : - what is X, I just do Y - wow I can see so many limits of Y, now I do X - I use X for literally everything - now that I properly understand the limits of Y but also the heavy constraints of X ... maybe Y is enough - I use Y for literally everything rinse & repeat. The thing is with actual usage and actual context one does learn and thus can get away with a lot more "basic" solution but it do…

behold, the bell curve meme

Re: SQLite is all you need for durable workflows

#380
post #22

I don't understand this obsession with SQLite for real, production apps. SQLite is an embedded database, completely unsuitable for managing concurrency. This is what database _servers_ are for, e.g., Postgres, MySQL, etc. Their entire job is to allow you to modify data from multiple processes, on different machines, at the same time. This is a foundational principle of computer science. It seems to me that the "SQLit…

you also seem to underestimate the performance you can get on one machine.
Post reply on HN