Sirius's avatar
Sirius
npub1g53m...drvk
Message me via chat.iris.to โ€” not using other Nostr DMs
Sirius's avatar
Sirius 2 years ago
Daily dev thoughts: Nostr notification server should probably connect to relays and let them do what they do best: filter -> subscription matching. On the notification server you'd just match the subscription ID to notification endpoints. Resubscribe everything if the relay websocket reconnects. If you're self-hosting and only have a small number of notification subscriptions (less than 20 or so), you can connect to public relays. If you're running a notification server for 1M users, you'll need your own private relay that has no subscription limit. I'm thinking of pubkey -> [notification subscription JSON] database. Pubkey is client & session specific, not linked to a Nostr public identity. What DB to use? I want it to be easy to self-host (docker at minimum) but also scaleable, so it can be the default notification server of a client. Efficient persistence is an obvious requirement. LMDB seems like a good option, but on the other hand MongoDB has lots of existing tools for administration, monitoring, indexing, JSON handling etc. @jb55
Sirius's avatar
Sirius 2 years ago
Fug... now that I'm home, I woke up last night to reflect on past cringes. On the main stage panel in Amsterdam I forgot what I was about to say (how to make money with Nostr) after already starting my answer and ended with "and umm yeah [awkward silence]". Should have re-asked the question. I'm quite sensitive to cringe, but fortunately those moments have been mostly off stage since Slush 2014 which was pretty bad (or maybe I just haven't noticed). I'm not the best speaker, but I'll try ๐Ÿ˜„ Come see me in Lugano next week!
Sirius's avatar
Sirius 2 years ago
Random dev thoughts: Would it be a good idea to do an open source web push notification server for Nostr? It could have fine-grained options for what notifications you want, from whom and how often. It could be used automatically in the background by a client, or through its own web UI. Clicking the notifications would redirect you to the client of your choice. It would be a lot like a relay in that it needs to match incoming events to a potentially large amount of subscriptions. Subscriptions would be persisted in a database and maybe managed over a REST API. In addition to the stuff typically sent over Nostr, you need to send the subscription object and other things like notification frequency, maximum social graph distance or score, minimum zap amount to notify etc. It would connect to other relays and maybe also have a websocket endpoint for receiving events over Nostr protocol. Extending strfry into this direction crossed my mind, but maybe something like Django (or whatever web framework you're familiar with) would be better, as we need to persist the subscriptions.
Sirius's avatar
Sirius 2 years ago
Secure DMs and groups might be how Nostr wins. Like Signal, but better: no phone number or centralized service provider needed. Actually there are no publicly visible user IDs involved, so in that regard it's similar to simplex.chat. Unlike public messaging, DMs do not depend on the network effect. Great for onboarding people and keeping them returning with push notifications. They get a bitcoin wallet, zaps and all the other Nostr greatness on the side. Many people don't want to let go of their existing follower base on X, but "Nostr DMs only" is easier to do. I could imagine that becoming a thing in the Bitcoin scene at first.
Sirius's avatar
Sirius 2 years ago
Got a bit awestruck again by the combination of natural beauty and a city built for humans by all the generations before us. We need a renaissance of beautifully built environments.
Sirius's avatar
Sirius 2 years ago
I'm at Bitcoin Amsterdam, but spent half the day finishing some Signal-style double ratchet messaging. Deployed an experimental version on You can create chat invite links and give them to friends via QR or other messaging. The UI is still lacking and glitchy, but just had to demo at the conference. The chats cannot be publicly linked to either participant, and even if your main Nostr key is revealed, the content and existence of past messages stays hidden. Also published npm package nostr-double-ratchet 0.0.1: https://www.npmjs.com/package/nostr-double-ratchet It's not actually double ratchet yet, but the single ratchet already achieves forward and backward secrecy. The second ratchet would help secure the latest consecutive messages by same author, in case a message key for the most recent of their messages is compromised. That makes disappearing messages or manually deleted messages more secure. I guess we'll have to do it so we can say "Signal-level security". This is obviously not tested or audited yet, but probably it's not worse than normal Nostr DMs ๐Ÿ˜… You can take a look at the source code, but I'll write a better technical description later. It's using existing Nostr cryptography + some key derivation stuff. Chat invites use gift wrap -like arrangement addressed to the inviter's temporary session key.
Sirius's avatar
Sirius 2 years ago
How to do millisecond timestamps on Nostr? ๐Ÿ’ In chats it's not unusual to send multiple messages during the same second, not to mention other stuff like games.
โ†‘