News for hackers. Stuff that matters.
Re:How the SQLite virtual machine works by tptacek on Wednesday September 07, 2022 @12:23PM (#32752674)
I don't think it has much to do with the name. I think the biggest perceptual impact on SQLite came from Rails, and its default for using SQLite as a test database while strongly discouraging people from using it in production.
Re:How the SQLite virtual machine works by post-it on Wednesday September 07, 2022 @12:46PM (#32752997)
Django too.

> By default, the configuration uses SQLite. If you’re new to databases, or you’re just interested in trying Django, this is the easiest choice. SQLite is included in Python, so you won’t need to install anything else to support your database. When starting your first real project, however, you may want to use a more scalable database like PostgreSQL, to avoid database-switching headaches down the road. [0]

[0] https://docs.djangoproject.com/en/4.1/intro/tutorial02/

Re:How the SQLite virtual machine works by tptacek on Wednesday September 07, 2022 @12:49PM (#32753047)
Sure, Django too.
Re:How the SQLite virtual machine works by 0x457 on Wednesday September 07, 2022 @01:39PM (#32753634)
To be fair, serving any kind of traffic with Rails required multiple replicas of Rails application running. So SQLite wasn't an option for production for any kind of production rails workload.

Then most hosting for rails were stateless, so you had no way of storing SQLite on disk.

And finally, for serious production you need high availability and SQLite couldn't offer that.

Re:How the SQLite virtual machine works by Abishek_Muthian on Thursday September 08, 2022 @03:29AM (#32762435)
Would Go's concurrency be an issue for SQLite too?

Edit: I looked into a common Go driver for SQLite[1] and the FAQ reads,

> Can I use this in multiple routines concurrently?

> Yes for readonly. But not for writable. See #50, #51, #209, #274.

Every time I see a blog post from fly.io reg SQLite I'm tempted to use it for my next project, But the need to rewrite my framework for limited data types and the doubts regarding concurrency keeps me away.

[1] https://github.com/mattn/go-sqlite3

Re:How the SQLite virtual machine works by tptacek on Thursday September 08, 2022 @03:38PM (#32770930)
My general M.O. for SQLite in Go is to have a single writer thread with a channel of closures to apply transactions, and a shared db handle for reads. Works fine.
Re:How the SQLite virtual machine works by Abishek_Muthian on Thursday September 08, 2022 @11:16PM (#32774887)
That's an useful information, Thanks for sharing.
Re:How the SQLite virtual machine works by randomdata on Wednesday September 07, 2022 @02:26PM (#32754312)
I think it's older than that, even predating SQLite. Back when Perl/CGI was all the rage it was common to store data in files. But the web was growing fast and scaling files was hard. Pushing that workload onto the heavyweight RDMBS was seen as the solution, reasonably so in some cases, but that also brought the cargo culting along with it.

When SQLite arrived it got lumped in with file storage that can't scale. Rails only perpetuated what everyone was already thinking.

Re:How the SQLite virtual machine works by nigma on Wednesday September 07, 2022 @01:14PM (#32753353)
There are many reasons for using other databases like PostgreSQL or MySQL in production - feature set, (managed) hosting, backup and replication, etc.

SQLite is primarily embedded/local database and cannot be easily separated and shared over network [1] between multiple disposable backend/worker instances.

[1] https://12factor.net/backing-services

Re:How the SQLite virtual machine works by tptacek on Wednesday September 07, 2022 @01:15PM (#32753372)
Yes, that's what Rails (and Django) say about it.
Re:How the SQLite virtual machine works by deepstack on Wednesday September 07, 2022 @01:52PM (#32753813)
yeah when it comes to embbed, if one is willing to go the java road, then H2 is an excellent DB to use. It is some what Postgres compliant.