I would need some kind of decentralized gossip/direct mesaging for a project.
I thought about using nostr to relay mesages, but:
  • i don't know if currently it is possible to push application specific mesages without polluting the current applications with some text that is garbage for them?
  • Even if it is possible, i guess i wouldn't want to abuse of the servers of the current relays. So, is it possible to easily embed a nostr relay in my application, that would use it's own 'mainnet', so users of the application are the relay themselves?
Yes, it's fairly practical. We use Nostr to relay Bitcoin PSBTs and other metadata about Bitcoin multisig wallets. We operate our own relay (strfry) and set a filter so it only relays our known message kinds.
reply
There's various kinds (type of messages) that you can use, you can also freely define unclaimed kinds ids for you app if you need them. There's some general rules on how they work in NIP-01.
You can check them all here: https://github.com/nostr-protocol/nips
There's also a third party list of what has been taken already, it includes some experimental kinds not listed in the main NIPs: https://nostrdata.github.io/kinds/
All this would still apply if you decide to self host your own relay.
reply
Thanks! Does that mean that if i define my own kind, other relays can simply choose to not relay this one if they don't want to, and i don't need to have my own 'nostr mainnet' to avoid overloading them?
reply
It depends on the relay, some filter what kinds they accept but yeah, if you have issues there you can contact the relay maintainers and ask if they can make it work with your kinds.
Also self hosting it's pretty simple, you can also have them as a paid option too, maybe for a social integration too.
You should analyse your project closely and see if some kinds might be reusable without have to make new ones, it's better to use the power already at hand if possible, especially if you need to keep it working even if your app have downtimes or you want to interact with other type of content, that's the beauty of nostr.
reply
you can setup your own relay sure
reply