3 ms·
Yes: sqlite3 only allows a single open write transaction per database file. Whether this matters or not depends on your application. For a large class of applic
by tptacek 3y ago
Yes: sqlite3 only allows a single open write transaction per database file. Whether this matters or not depends on your application. For a large class of applications, this isn't a real issue at all. By way of example: until a few months ago, we were concurrently merging state updates from tens of thousands of VMs across our global worker fleet into a single SQLite database. As has been said across this thread, SQLite works well as a backend for read-heavy applications. A great many CRUD apps are read-heavy!
If you want more concurrency, you can break your schema up into multiple .db files. This sounds onerous but SQLite makes it very easy to do.
- evantbyrne 3y agoThat's great it worked for you, but that's not a website backend. It would be foolish to run HN on SQLite for instance. I would go as far as to call it a vulnerability in such context, due to how easily it could be DoS'd.
- tptacek 3y agoHN famously ran (still runs?) on a series of flat files. You found the actual worst possible rebuttal.
- evantbyrne 3y agoMaybe you don't understand SQLite's locking issues? Having a bunch of different files that can be written to concurrently sounds like a better solution than SQLite for a social network backend.
- tptacek 3y agoYes, maybe that's it.