6 ms·
>Almost always the data is the most important thing, so I like being able to expand/replace/trash the app infra at will with no worries. Have you used SQLite w
by mtlynch 2y ago
>Almost always the data is the most important thing, so I like being able to expand/replace/trash the app infra at will with no worries.
Have you used SQLite with Litestream? That's the beauty of it. You can blow away the app and deploy it somewhere else, and Litestream will just pull down your data and continue along as if nothing happened.
At the top of this post, I show a demo of attaching Litestream to my app, and then blowing away my Heroku instance and redeploying a clean instance on Fly.io, and Litestream ports all the data along with the new deployment:
https://mtlynch.io/litestream/ https://mtlynch.io/litestream/
- LVB 2y agoI'm currently using SQLite + Litestream with one app, though it's strictly Litestream as a backup/safety net and I'd be manually standing the thing back up if it came to building the server anew, as that's not automated. If anything, I'd probably end up looking at a dedicated PG VPS. I've started to get used to a few Postgres conveniences over SQLite, especially around datetimes, various extensions, and more sophisticated table alterations (without that infamous SQLite 12-step process), etc. So that's been an evolution, too, compared to my always-SQLite days.
- Cheer2171 2y ago> No, my app never talks to a remote database server. > It’s a simple, open-source tool that replicates a SQLite database to Amazon’s S3 cloud storage. That was a very long walk to get to that second quote. And it makes the first quote feel deceptive.
- metabeard 2y agoS3 is acting as a backup, not a data store. The SQLite file is local to the app. This recent post discusses the tradeoffs in more detail and includes metrics. https://fractaledmind.github.io/2024/10/16/sqlite-supercharges-rails/ https://fractaledmind.github.io/2024/10/16/sqlite-supercharg...
- mtlynch 2y agoThanks for the feedback! Can you share a bit more about why you feel it's deceptive? The point I was trying to make is that database servers are relatively complex and expensive. S3 is still a server, but it's static storage, which is about as simple and cheap as it gets for a remote service. Was it that I could have been clearer about the distinction? Or was the distinction clear but feels like not a big difference?
- deleted 2y ago[deleted]
- rkwz 2y agoThis is a well written guide, thanks!
- mtlynch 2y agoCool, glad to hear it was useful!