| ▲ | Panzerschrek 7 hours ago | |||||||||||||
> There's no separate database server. You open the database file through SQLite's C API. > Every request spawns a fresh process. How does it work when multiple concurrent requests are possible? Does SQLite allow simultaneous write access from multiple processes? | ||||||||||||||
| ▲ | citrin_ru 7 hours ago | parent | next [-] | |||||||||||||
SQLite does allow write access from mulitple processes - file locks (fcntl) are used to ensure at any given moment only one of processes modifies the database (or WAL if WAL is enabled). | ||||||||||||||
| ▲ | prophittcorey 7 hours ago | parent | prev | next [-] | |||||||||||||
SQLite can handle multiple concurrent requests if it's set to WAL mode. Reading is all non-blocking/concurrent but writing is still synchronous. You should also set the "busy timeout" or else your blocked writes will timeout immediately. | ||||||||||||||
| ▲ | tomjen3 3 hours ago | parent | prev | next [-] | |||||||||||||
In Wal mode you can have multiple readers. Writers block, but because there is no network traffic, the writers finish very quickly, so in practice you don't usually wait that long. | ||||||||||||||
| ▲ | warkdarrior 7 hours ago | parent | prev | next [-] | |||||||||||||
Users who send concurrent requests will be summarily banned and their data deleted. It's the only way to be sure. | ||||||||||||||
| ▲ | huijzer 6 hours ago | parent | prev [-] | |||||||||||||
SQLite is a database. The main idea of a database is to support concurrent reads/writes although databases differ in how much concurrency they allow | ||||||||||||||
| ||||||||||||||