What is Nostr?
jb55 / Will
npub1xts…kk5s
2024-07-16 15:12:49
in reply to nevent1q…k8vs

jb55 on Nostr: You create subscriptions on nostrdb, but they are just threadsafe queues of pointers ...

You create subscriptions on nostrdb, but they are just threadsafe queues of pointers to binary notes in the db instead of json and websockets and all that.

The idea is that you create remote subscriptions like normal, but the results of those subscriptions are only dumped into nostrdb.

nostrdb has a super efficient de-duping threadpool note processor. Any new incoming note matching a local subscription will be pushed to the subscription queues. They can be then polled or you can register a callback.

You can even do privacy stuff like open a remote global filter, and have local subscriptions that try to match notes without leaking any queries on the relay. This is a bit more bandwidth intensive of course.
Author Public Key
npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s