Ryan Barrett on Nostr: Consider the world’s simplest database: #!/bin/bash db_set () { echo "$1,$2" >> ...
Consider the world’s simplest database:
#!/bin/bash
db_set () {
echo "$1,$2" >> database
}
db_get () {
grep "^$1," database | sed -e "s/^$1,//" | tail -n 1
}
– Designing Data-Intensive Applications, 2nd edition, Martin Kleppmann and Chris Riccomini
Published at
2026-05-05 00:14:54 UTCEvent JSON
{
"id": "cd197dcb6cfb349da337ffe87047cc3a167fae97a9c3505a43e0e5da1e27698d",
"pubkey": "2a8484b0df89b96e3bedf270d8fce7e4ca331893819b54f4950ca262e1061dd4",
"created_at": 1777940094,
"kind": 1,
"tags": [
[
"proxy",
"https://fed.brid.gy/r/https://snarfed.org/2026-05-05_57007",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "\n\nConsider the world’s simplest database:\n#!/bin/bash\n\ndb_set () {\n echo \"$1,$2\" \u003e\u003e database\n}\n\ndb_get () {\n grep \"^$1,\" database | sed -e \"s/^$1,//\" | tail -n 1\n}\n\n\n– Designing Data-Intensive Applications, 2nd edition, Martin Kleppmann and Chris Riccomini\n",
"sig": "76d60a44e25aec0d1ef2cd29d2e8dbff7f1b37c63ec52759346c175c136dadcc5f209562133ca2758d395866e85fe23e77543876de6e9c98ef7904acbf659b5c"
}