News for hackers. Stuff that matters.
Re:SQLite as an Application File Format (2014) by combatentropy on Monday December 24, 2018 @10:30PM (#18755720)
In SQLite, a database file can be 140 terabytes, https://www.sqlite.org/limits.html

And reading and writing can be even faster than if they were stored directly in the filesystem, https://www.sqlite.org/fasterthanfs.html

Re:SQLite as an Application File Format (2014) by devmunchies on Monday December 24, 2018 @11:09PM (#18755845)
So does that mean serving static files from a SQLite file would be faster than something like NGINX?
Re:SQLite as an Application File Format (2014) by oscargrouch on Monday December 24, 2018 @11:47PM (#18755960)
No, because of the sendfile syscall, where the kernel pass all the file data without switching back to userspace.

Even if you can in theory save some time with small files with sqlite, you would be back to read/write IO and userspace/kernel byte buffer switching.

And it probably wouldn't be faster than something like a mmaped file anyway (unless the SQLite Db is also mmaped).

Re:SQLite as an Application File Format (2014) by fiddlerwoaroof on Tuesday December 25, 2018 @12:36AM (#18756107)
The thing is SQLite handles a lot of hard problems that you might not realize you have: like “was my data actually written to the disk”
Re:SQLite as an Application File Format (2014) by qwerty456127 on Tuesday December 25, 2018 @03:05AM (#18756506)
Why don't we replace entire filesystems with SQLite then?
Re:SQLite as an Application File Format (2014) by darkpuma on Tuesday December 25, 2018 @04:23AM (#18756705)
>"This file contains some example code demonstrating how the SQLite vfs feature can be used to have SQLite operate directly on an embedded media, without using an intermediate file system."

https://www.sqlite.org/src/doc/trunk/src/test_onefile.c

https://www.sqlite.org/vfs.html

IIRC, during one of his talks D. Richard Hipp mentions this actually being done for real.

Re:SQLite as an Application File Format (2014) by phiresky on Tuesday December 25, 2018 @09:31AM (#18757546)
SQLite does not support BLOBs larger than 2GB, so in that sense it's only as good as FAT32