Devs, I need some advice. I’m trying to build a Nostr client as a learning experience. LMDB seems to be freaky fast in tests and practice with the strfry relay but SQLite is more widely used. Which would work better for storing and retrieving events in a client? Once I pick one how easy will it be to switch back?

Reply to this note

Please Login to reply.

Discussion

As much as I'm a fan of SQL, for this id go with LMDB. The structure of nostr events is more conducive to KV. Switching from one to the other will require changing your data access layer. There's no simple drop in library replacement AFAIK. And if there were, it'd likely cost some performance and memory footprint to normalize

Thanks! I wasn’t sure if I’d actually need the added complexity of SQL.