News for hackers. Stuff that matters.
Re:Consider SQLite by greatjack613 on Wednesday December 29, 2021 @01:55PM (#29728428)
I use SQLite exclusively on a high performance crypto sniper project - https://bsctrader.app and I could not be happier with it.

Performs much better then postgres in terms of query latency which is ultra important for the domain we operate in.

I take machine level backups every 2 hours, so in the event of an outage, just boot the disk image on a new vm and it's off.

I would never do this on my professional job due to the stigma, but for this side project, it has been incredible

Re:Consider SQLite by bob1029 on Wednesday December 29, 2021 @03:21PM (#29729515)
> I would never do this on my professional job due to the stigma, but for this side project, it has been incredible

I love controversy so I was able to push SQLite through as the sole persistence mechanism for our product. Virtually every constraint lined up with our business perfectly.

We sell a B2B product that gets installed by our customers, so they love it too. No more sweaty hands conversations about why their database server cant talk to their application server over their networks while we are caught in the middle trying to avoid taking ownership of their internal IT problems.

Re:Consider SQLite by altantiprocrast on Wednesday December 29, 2021 @10:34PM (#29733236)
I think that's one of the inspirations behind sqlite.

> They’d double click on the thing and a dialog box would pop that says, “Can’t connect to database server,” and it wasn’t our fault. We didn’t have any control over the database server, but what do you do if you can’t connect to the server, so we got the blame all the same because we were painting the dialog box.

https://corecursive.com/066-sqlite-with-richard-hipp/

Re:Consider SQLite by dkjaudyeqooe on Wednesday December 29, 2021 @02:14PM (#29728728)
> I would never do this on my professional job due to the stigma, but for this side project, it has been incredible

Using the right tool for the job does indeed carry a lot of stigma in many professional environments. Instead you use the tool that some VP has been sold by some salesman.

Re:Consider SQLite by catillac on Wednesday December 29, 2021 @02:00PM (#29728506)
The stigma of using the most popular database in existence?
Re:Consider SQLite by copperx on Wednesday December 29, 2021 @02:09PM (#29728656)
For the domain of webapps, where multiple concurrent writers are often expected, yes, I would say it's a stigma.
Re:Consider SQLite by usrbinbash on Wednesday December 29, 2021 @03:07PM (#29729353)
Are they expected, or are the required?

Because, serializing db access through a single process only becomes a problem when the number of reads/writes get so large, that the process becomes a bottlenec.

And judging by the test the author of the linked article did, that would have to be a HUGE number.

Re:Consider SQLite by pdimitar on Thursday December 30, 2021 @05:46PM (#29742456)
That's only a theoretical limitation. 99% of all your typical insert / update / delete operations finish in the single digits of milliseconds, making the serial nature of SQLite writes a problem when you get north of 5000+ requests per second.
Re:Consider SQLite by rhn_mk1 on Wednesday December 29, 2021 @03:05PM (#29729328)
> machine level backups

I presume that's block level backups? Or some snapshotting?

As far as I know, block level filesystem copies can get inconsistent (so we have journalling file systems). But assuming it works well, like a filesystem aware snapshot, can sqlite deal with files snapshotted in the middle of an operation?

Re:Consider SQLite by greatjack613 on Wednesday December 29, 2021 @07:08PM (#29731809)
That's a really interesting questions, I have not even considered that. Just using my providers automated backup system. Never had to restore yet
Re:Consider SQLite by rhn_mk1 on Wednesday December 29, 2021 @07:12PM (#29731848)
They say a backup becomes a backup after it's successfully restored :)