*trys to contain hype levels*. its working and its incredible 🥲. Implementing the local relay model on android and notedeck first has been great for prototyping and working out the bugs… I also have a huge branch on the iOS side that switches damus-iOS over as well. If i’m quiet lately this is why. Will demo soon once I resurface nostr:note1t26ds08dxyhmcrgyk9ppjq69ktgdu7s9dsru4qhpanz5vkffdasqt8v6yz

Reply to this note

Please Login to reply.

Discussion

👀

💣👀

how does this work? is the idea queries are concurrently issued both locally and upstream, and notes are deduped?

Subscriptions are made on nostrdb, and the same subs are made on remote relays. The only thing the network code does is call ndb_process_event, this feeds the notes to a multithreaded ingester that can de-dupe without even parsing the entire json blob so it’s crazy fast. When ingesting it verifies signatures, collects like stats, indexes and parses contents, stores in a compact binary format, parses profiles into flatbuffers, etc. Once it’s done processing it lets the local subscriptions know if they are looking for it.

So client code only ever talks to the local relay (nostrdb), and the UI code doesn’t have to do any processing. Everything is there once its ready.

damn, I love how much you sucked into nostrdb to keep the client code simple and consistent.

nostrdb fixes this™️

A lot of this would have been duplicate could I would have had to write in different clients, so it made sense to just put it all in one library and make it stupid fast.

The Rust bindings are also coming together and are way nicer to use than the C api, so this will likely become the standard way to use it for most projects.

I want go bindings badly but haven’t put in the work to make it happen.

Can relate…