Say I want to build a simple app that stores a user's data to be called up later. For the sake of discussion, let's call it an Evernote-style note-taking app. Does it make sense to use nostr as a database? eg: instead of running my own mariadb or whatever, I can run a relay that the app always connects to, and my relay will guarantee that "type" of data is stored forever. Does that make sense? I'm not interested in any of the twitter-like connections for this app. I understand that this isn't super, duper decentralized unless other relays choose to store this data.
I'm in the middle of taking the pleblab nostr course, and I've got some ideas brewing in my head. Thought I'd poke SN to see if my thought process makes any sense :)
No, this is a terrible idea.
Nostr describes a way to transmit data, not store it. Storing data in this way doesn't actually save you anything:
  • You're still setting up a server
  • Your client still needs to call the data
  • You're adding in extra query overhead because it's not really structured
    • It'll be much slower and less scalable than using a proper database
Focus on what nostr is good at, hole-punching and distributed-ness.
Don't get distracted by what it isn't good at.
A better way would be just to use better structured json or sqlite with generic storage adapters so users can save anywhere like their cloud drive or ftp server of preference.
reply
that's what it is! Go for it 💪
reply
That is kinda how Nostr is meant to work. But there’s an open debate in the dev community about how much to put in relays (just text? Images? Videos?) it’s still an outstanding question.
If relays house too much data it’ll be hard for people to run small relays so the network will be more centralised. If relays don’t allow people to store whole files in them, then those files will have to be stored somewhere.
Personally I’d like to keep big files off relays and lets solutions like Nostr.build provide specialised efficient offerings and accept Bitcoin as payment.
But there’s already apps that allow a Nostr user to create notes and store them on relays.
reply
Interesting idea. I'm not knowledgeable enough to talk about Nostr protocol but here are a few thoughts.
  • You could host your own relay/s to have more control over preserving data
  • Is privacy a concern?
  • Would you need to encrypt the content of the messages?
  • I know Nostr has message types. Is there a type that would support this use case?
  • How important is performance/latency?
  • Is this a solution in search of a problem (ie most "blockchain" projects)
If it were me I'd start by looking at the pros/cons of Nostr as a DB service. Also, it seems like I've see someone discuss doing something like this already. It might have been deploying apps on Nostr. Been a while.
reply
Nostr feel like free hosting plan but its forever and no limits ,no restriction
reply
Seems like that on the surface. I'm skeptical if it will be in practice. Content will be on somone's computer and disk space / energy are not free. Also relays can decide what to relay to clients. Nice thing that you can host your own relays though.
reply