Damus
Vitor Pamplona profile picture
Vitor Pamplona
@VitorPamplona
Should each account on Amethyst have it's own database of Nostr events? Or should we have just one DB with everything for all logged-in accounts?

Having one DB for each account enables us to save decrypted content that should only be seen by that account, speeding up the visualization of that encrypted content (like chat messages). However, it also massively duplicates content if both accounts are seeing similar things on public feeds.

Maybe we need a dual-layer database approach. One layer to store everything as it came from relays and a second layer with one database per account to store things in a decrypted fashion ๐Ÿค”.

Thanks for helping me out.
143โค๏ธ6๐Ÿค™2๐Ÿงก2โ™ฅ๏ธ1๐Ÿ‘€1๐Ÿ’œ1
N3WD3V · 134w
I say do w.e minimize file size for optimal storage
Mabardino ๐Ÿ€ · 134w
1 database, I don't see anyone using multiple accounts on 1 device where they wouldn't want to let one account see the others dm's(it's the same end user so they have access anyway)
Duck Nebuchadnezzar · 134w
I like the layer 2 database with a user-agnostic cache of events and each user has their own db for decrypted stuff.
hodlbod · 134w
I keep one database for all accounts and filter down when querying. Svelte stores make this pretty efficient.
crany ๐Ÿ‘ฝ๐Ÿงก๐Ÿ—ฟ · 134w
Start decentralized and work up as needed a layer. Imho
Vlady · 134w
I think one database that would cache all events and date stamp each event. When data requested if it's in the DB just display, if missing download. If date stamp is passed retention period record is purged from db. If data is requested, but exists in the DB update date stamp to current time. Db...
Jakk Goodday · 134w
Scale it's on-top layer, simply on base layer
hello · 132w
I highly suspect that at least saving text locally is entirely doable. My terrible old phone has like 60GB of data and I would gladly give up a GB to save, how many texts? I would suspect more than the entire library of Alexandria's worth