Love SQLite - in general there are many challenges with a schema or database per tenant setup of any kind though. Consider the luxury of row-level security in a shared instance where your migration either works or rolls back. Not now! If you are doing a data migration and failed to account for some unexpected data, now you have people on different schema versions until you figure it out. Now, yes, if you are at sharding scale this may occur anyway, but consider that before you hit that point, a single database is easiest.<p>You will possibly want to combine the data for some reason in the future as well. Or, move ownership of resources atomically.<p>I'm not opposed to this setup at all and it does have its place. But we are running away from schema-per-tenant setup at warp speed at work. There are so many issues if you don't invest in it properly and I don't think many are prepared when they initially have the idea.<p>The funny thing is that about a decade ago, the app was born on a SQLite per tenant setup, then it moved to schema per tenant on Postgres, now it's finally moving to a single schema with RLS. So, the exact opposite progression.
What do they mean by "Since SQLite does not support concurrent transactions" - it supports them, as long as you don't access the .db file through a file share (UNC, or NFS, etc) - <a href="https://www.sqlite.org/wal.html" rel="nofollow noreferrer">https://www.sqlite.org/wal.html</a><p>I've been using this to update/read db from multiple threads/processes on the same machine. You can also do snapshotting with the sqlite backup API, if you want consistent view, and to not hold on transaction (or copy in-memory).<p>But maybe I'm missing something here... Also haven't touched sqlite in years, so not sure...
Interesting... I like the strategy of having each user be 1:1 with a DB. What would be done for data that needs to be aggregated across users though? If I'm subscribed to another user and they post, how does my DB get updated with that new post? Or is this meant just for durable data and not feed data (like profile data, which users are followed / not followed / etc.) and all the interactive stuff happens separately?<p>I like that "connection pooling" is just limiting the number of open handles in a LRU cache. It's also interesting because instead of having to manage concurrency at the connection level, it handles it at the tenancy level since each DB connection is single-threaded. You could build up per-DB rate limiting on top of this pretty easily to prevent abuse by a given user.<p>Is there a straightforward way to set up Litestream to handle any arbitrary number of DBs?
Always happy to see more server SQLite/Litestream adoption which we've also been using to build our new Apps with.<p>SQLite + Litestream is an even greater choice for tenant databases, that's vastly cheaper to replicate/backup to S3/R2 than expensive cloud managed databases [1] (up to 3900% cheaper vs SQLServer on Azure).<p>[1] <a href="https://docs.servicestack.net/ormlite/litestream" rel="nofollow noreferrer">https://docs.servicestack.net/ormlite/litestream</a>
At a previous fintech role the company would store customer accounts as encrypted sqlite3 files on blob storage ... this worked out decently well for our access patterns.
On the surface, this looks like the worst combined with the awful. I hope someone will make a good article with some hard numbers to explain the benefits and analyze the assumed flaws, because this could be something really, fascinating to learn about.
If anyone needs a Bluesky invite, there are three in the About section of my profile page here (note: you will need to prepend "bsky-social-" to the code).
This should make leaving the service rather simple. Download your sqlite file and throw up a simple local-only html front end to the data and you're solid.
That looks like the PR from hell - 190 files changed, 143 commits? Mostly with names like "tidy" and "wip"<p>Props to whoever actually reviewed that, you are a warrior
This seems like a very misleading title, the Bluesky PDS is the meant-for-selfhosting thing they distribute, not the bluesky service as experienced and used by most of its users.
Slightly related: is Bluesky moderated good enough or do I get lots of rightwing and conspiracy crap like on twitter currently?<p>I‘d really love to have some more civilized hub again that isn’t full of hate and anti-intellectualism.
Anyone interested in joining Bluesky, please grab these. I have extra and I've already invited all my Twitter mutuals I wanted to invite.<p>Edit: I'm all out now :)
I've got a bunch of invites if folks want them:<p>bsky-social-etdu7-njigu<p>bsky-social-2ktcs-uwoxg<p>bsky-social-6f5nh-36gnq<p>bsky-social-ciwro-3gzk5<p>bsky-social-y4h57-dxh3g