4 ms·
I'm not so sure this would work. Yes, SQLite will do its best to synchronize the requests, but that's all built on the assumption the file exists on a normal fi
by xg15 5y ago
I'm not so sure this would work. Yes, SQLite will do its best to synchronize the requests, but that's all built on the assumption the file exists on a normal file system with locks, consistency, etc. However, this is not the case here.
At the very least, you'd have to emulate file locks on the HTTP layer - and deal with the problem of requests being delayed, getting losts, clients suddenly vanishing, etc.
> though i do need to ensure i'm writing from a single thread.
But how would you do that? This being a web app, it's hard to ensure you're even writing from a single machine.
- sekao 5y ago> but that's all built on the assumption the file exists on a normal file system with locks, consistency, etc. However, this is not the case here. It is the case here. Writes are happening on a normal linux VPS, and subsequently copied to S3. The read-only queries are using the HTTP VFS. It would be incredibly bad to enable direct writes to a db from arbitrary clients.
- xg15 5y agoAh, now I get it. I agree, if writes go through a backend, this should work.