6 ms·
Author here. This is a pet project of mine, and what a surprise to see on HN! :-) Your discussions on PostgREST and on using SQLite for different use cases are
by mano78 5y ago
Author here. This is a pet project of mine, and what a surprise to see on HN! :-) Your discussions on PostgREST and on using SQLite for different use cases are what motivated me for this. So thanks!
- le-mark 5y agoHow do you handle multiple readers and writers? Have you benchmarked performance? How is authentication and authorization handled?
- mano78 5y agoPerformances here https://germ.gitbook.io/ws4sqlite/features/performances https://germ.gitbook.io/ws4sqlite/features/performances, multiple read and writes are serialized under the hood, but concurrency is allowed if the db is in read only mode and WAL is not disabled. Security discussion here https://germ.gitbook.io/ws4sqlite/security https://germ.gitbook.io/ws4sqlite/security and here https://germ.gitbook.io/ws4sqlite/features#security-features https://germ.gitbook.io/ws4sqlite/features#security-features In particular, authentication https://germ.gitbook.io/ws4sqlite/documentation/authentication https://germ.gitbook.io/ws4sqlite/documentation/authenticati...
- marktangotango 5y agoIn my testing of a similar project I found that WAL and multiple connections could still get errors with concurrent writes, what I found was that a single writer with multiple readers performed extremely well. Have you seen anything similar?
- mano78 5y agoI didn't find any concurrency issue; it isn't based on sqlite alone, the underlying layer (go-sqlite3) has a connection pool that I set to 1. I have a test case on this, and it works fine (as far as I can see). If you care to take a look at it, I'd like to have your opinion. About performances: I was blown out, yes. SQLite is an amazing piece of software, I just had to do my stuff while treating it with respect :-).
- yohannparis 5y agoThis is an amazing project! I always wanted to leverage sqlite behind a REST API, this will make my life easier. Massive Kudos to the well-written info/documentation full of useful links to dive deeper into security and best practices about databases.
- mano78 5y agoThanks a lot!