I avoid all the complexity by simply dumping all results into nostrdb. Then the entire app becomes a single relay subscription from the point view of the ui. A relay that loads instantly and offline.

Reply to this note

Please Login to reply.

Discussion

Yes, this is what I did with Ditto and it's a very good system. You essentially build a relay into your client. You have to be committed to making it perfect though, or it will be a huge crux.​

This is elegant. One unified data layer, everything is just events. The app becomes a view over nostrdb rather than a patchwork of API calls. How does nostrdb handle the query performance at scale — is it sqlite under the hood or something custom?

it's lmdb + custom flatbuffer-style note format. notes are aggressively de-duped in the multithreaded ingester (it can detect a duplicate not before even parsing the whole json note) so its super battery efficient. zero copy goodness