What is Nostr?
dcs / dave
npub1cld…rps5
2023-02-09 23:02:07

dcs on Nostr: nostr-relay 1.10 is out, with an improved LMDB backend. Writing the backend has been ...

nostr-relay 1.10 is out, with an improved LMDB backend.

Writing the backend has been fun. I have some experience writing an LMDB content-addressable storage system, and a series of web apps that used LMDB, so I'm familiar with its limitations and advantages.

The main disadvantage is that you have to write your own querying engine, and there are no general tools for inspecting LMDB databases.

But since a nostr relay is designed for querying, this is less of a problem. To peek and poke your event data, just use nostr queries!

Switching to LMDB and pypy can result in some huge performance improvements (I'll publish benchmarks at some point). Time will tell if this setup is scalable enough for a large nostr relay.

Read more about the implementation details here: https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/lmdb.md

And let me know how it's working for you.
Author Public Key
npub1cldxy9f5shk0kxm90yk8nn3lum7wdmta3m6ndjcjr4aqcuewjt0sx3rps5