by markusw · 3y ago · 0 comments
Happy to answer any questions. Although SQLite is so dead-simple-but-awesome that you probably don't have any. :D
Anyway, hope you enjoy it and learn a thing or two.
Markus
The APIs can even support authentication and authorization with the help of JWT tokens. SQLite may not have row-level security, but even a convention (eg: if a row has user_id column, the JWT must have the same user_id value to get access to a row) would go a long way.
[0]: https://docs.datasette.io/en/latest/json_api.html#the-json-w...
[1]: https://simonwillison.net/2022/Dec/2/datasette-write-api/
https://github.com/subzerocloud/showcase/tree/main/flyio-sql...
Although I definitely would like to use SQLite just for the cost savings for something. Litefs/litestream looks great.
Without the WAL enabled, I get a around 400req/sec.
edit: clarity
You would have trouble scaling up to fives of authors, though, which would be a deal breaker for any serious production app.
Expensify got 4 million request _per second_ out of a custom SQLite-based setup (on a huge machine, but still): https://blog.expensify.com/2018/01/08/scaling-sqlite-to-4m-q...
I would call those serious production apps.
I don't know how it's done in PHP, I would think it's similar.