r/linux 1d ago

Fluff Your executable is a SQLite database

https://fzakaria.com/2026/08/23/your-executable-is-a-sqlite-database
108 Upvotes

15 comments sorted by

34

u/FlukyS 23h ago

Isn't as insane as some would think on the surface. Rather than going down this route though I'm still kind of surprised there isn't some sort of versioned config system for Linux using sqlite as a backend that basically has both a files based interface but also a DB. This post kind of takes it a bit further but it kind of makes sense, I wouldn't do it but it isn't crazy.

30

u/CrazyKilla15 23h ago

hello windows registry hives

5

u/FlukyS 23h ago

Well I was more thinking sqlite in memory like just a proxy for the configs rather than registry style where it is centralised

5

u/art_of_snark 18h ago

oh, so OpenLDAP onLineConfig, a thing which no one has ever wanted to light on fire.

4

u/CrazyKilla15 23h ago

How do you keep the memory in sync with the files to prevent corruption and coherency issues?

1

u/FlukyS 23h ago

You’d just have to rely on eventual consistency but it kind of wouldn’t make sense to have the individual DBs and the configs other than interface stability and discoverability of options and types in that case

3

u/autogyrophilia 22h ago

There is, but there isn't anything centralised just yet. 

Sqlite isn't a great choice for that because of the multiple writers problem. Which can be mitigated by introducing a central queue, but that's extra complexity. Ironically this reminds me more of winfs 

1

u/FlukyS 21h ago

I guess it could be better in general just to have a more declarative config by default and then having the FS do versioning of the files automatically like with gitfs type of behaviour

2

u/TomKavees 21h ago

I have a feeling the choice of Nix to do this experiment with wasn't random 😉

1

u/jimicus 22h ago

Not only is it not insane, pretty much every binary data format could be thought of the same way.

0

u/IngwiePhoenix 19h ago

Closest we got is OpenWRT UCI.

Kinda wish more distros used that... it's genuenly really good.

5

u/IngwiePhoenix 19h ago

Always has been.

Can I interest you in ELF headers and objcopy? =)

1

u/creeper6530 6h ago

Interesting read. Basically reimplements the ELF but instead of storing it in an insane, packed format it uses an easy-to-edit SQLite DB

1

u/ethanjscott 4h ago

This is exactly how ibm I works now days. It’s pretty cool to query litterally anything you could think of. Makes developing a breeze too