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.
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.