coolest thing about building on #nostrdb is that it comes with command-line tools and a portable database that is just a single file. you can copy your nostrdb node from damus-ios to notedeck and back and it will just work (todo: actually implement ios export). it has all of your nostr data, contacts, profiles, bookmarks, notes, mutelists, decks, everything! It also includes a fulltext search and relay index. sure you can use relays for this, but its nice to have a local copy you can backup and redistribute later. eventually your nostrdb nodes will just automatically sync so you don't have to do this manually.

Replies (11)

Please share the best starting point Or site to learn more about nostrdb.
nostr-sdk is probably better setup to do that. nostrdb is more for building high-performance apps on top of. I haven't focused too much on dev docs.
Justin Moon's avatar
Justin Moon 0 years ago
Cool -- my goal would eventually be to build "high performance apps" but I need to start somewhere ...
if you want raw performance using nostrdb-rs directly is best, since when nostr-sdk wraps it, it kills the perf as it is no longer zero-copy.
the main point of enostr/nostrdb_net is to avoid parsing json twice, enostr basically just barely and badly parses some high level tokens (OK, EOSE, AUTH, etc, subscription ids, etc) without parsing the json. then it passes the websocket &str directly to nostrdb for processing.
Justin Moon's avatar
Justin Moon 0 years ago
Also extremely helpful! Makes a ton of sense.
@Justin Moon, yeah, you can use nostrdb APIs directly for the zero-copy queries and nostr-sdk for the networking stuff. You can eventually clone the nostrdb instance and pass it to nostr-sdk just to automatically save the events received from the relays into nostrdb.