6
3 Comments

I'm all in on SQLite

I used to shrug off SQLite as a toy database for local development - as do most.

In the past few months I heard more and more how capable this database really is and that for everything I do it performs just as good or even better than it's bigger brothers Postgres (my choice until now) or MySql.

Sure SQLite isn't without it's problems either... horizontal scaling across multiple servers (I don't need that, you can get a machine with 100GB of RAM and dozens of CPUs) or the lack of parallel writes (mine are usually fast and way less common than reads).

Now, I deploy all my apps on Dokku it's an awesome little piece of OpenSource that replicates the most important parts of Heroku.

One of the problems with SQLite was - until recently - the production deployment. On Heroku, with it's ephemeral filesystem, you'd loose your DB every day. Even on Dokku with persistent storage from the host VPS, there is no way to back it up.

Now we have Litestream which is another amazing piece of OpenSource - it allows seamless replication (and restore) of your SQLite DB to external storage like S3.

Last missing piece: configuring Litestream on Dokku - may I introduce Dokku Litestream a plugin that takes all the heavy lifting of your hands.

I just wrote it last weekend and have been trying it for the past couple of days. It's not ready for prime-time yet but so far it's doing it's job.

Let me know what you think!

posted to Icon for group Open Source
Open Source
on May 20, 2022
  1. 1

    Nice!

    If Sqlite gets row level security like Postgres would be a game changer.

    1. 1

      Interesting, I wonder if that's on the roadmap or never gonna happen.

      TBH I never had the use case for it in my web applications though.

      1. 1

        I use it with Supabase and Postgres. It is truly amazing.

        For those devs who combine the two it has changed our world.

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 28 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 21 comments Codenhack Beta — Full Access + Referral User Avatar 19 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 12 comments How AI-first almost ruined everything User Avatar 8 comments