excited about databases, storage engines and message queues
bsky.app/profile/did:...
bsky.app/profile/did:...
During decryption, you read the tag and nonce from the reserved space and provide them to the decryption algorithm. (4/5)
During decryption, you read the tag and nonce from the reserved space and provide them to the decryption algorithm. (4/5)
To make space, SQLite uses reserved space per page. Once the page is encrypted, this portion can carry the metadata. (3/5)
To make space, SQLite uses reserved space per page. Once the page is encrypted, this portion can carry the metadata. (3/5)
So during encryption, we generate a secure random nonce every time. (2/5)
So during encryption, we generate a secure random nonce every time. (2/5)
Extensions like encryption and checksums need to store extra metadata per page, and they use this reserved space. (8/9)
Extensions like encryption and checksums need to store extra metadata per page, and they use this reserved space. (8/9)
Databases also maintain a buffer pool, think of it as a cache of pages loaded from disk. These pages often get reused. (4/9)
Databases also maintain a buffer pool, think of it as a cache of pages loaded from disk. These pages often get reused. (4/9)
That middle section is logically free space, but here's the interesting part is it can contain any data. Neither the page nor the B Tree cares about what's in there. (3/9)
That middle section is logically free space, but here's the interesting part is it can contain any data. Neither the page nor the B Tree cares about what's in there. (3/9)
- Limits SELECT to 1,000 rows (no more accidental SELECT * on giant tables)
- Caps joins at 1M row combinations
You can override these with --select-limit and --max-join-size if needed.
- Limits SELECT to 1,000 rows (no more accidental SELECT * on giant tables)
- Caps joins at 1M row combinations
You can override these with --select-limit and --max-join-size if needed.
I call this Limitless Sharding.
I call this Limitless Sharding.
The downsides: You'd only need this at "scale". The entire architecture assumes you don't need cross-shard queries. So this only works for applications where each document is truly an individual entity.
The downsides: You'd only need this at "scale". The entire architecture assumes you don't need cross-shard queries. So this only works for applications where each document is truly an individual entity.
I'd bet this model can handle way more writes per second than a sharded Postgres/MySQL setup.
I'd bet this model can handle way more writes per second than a sharded Postgres/MySQL setup.
Running a million Postgres or MySQL instances sounds crazy and is total overkill. But embedded databases like SQLite, lmdb, and RocksDB fit this perfectly. They're just files!
Running a million Postgres or MySQL instances sounds crazy and is total overkill. But embedded databases like SQLite, lmdb, and RocksDB fit this perfectly. They're just files!
Think of applications like Notion, Figma, or Google Docs — each document is disconnected from the others. The key insight: each document gets very few write requests since users are making changes manually.
Think of applications like Notion, Figma, or Google Docs — each document is disconnected from the others. The key insight: each document gets very few write requests since users are making changes manually.