Replying to Avatar Vitor Pamplona

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.

Avatar
hodlbod 2y ago

I keep one database for all accounts and filter down when querying. Svelte stores make this pretty efficient.

Reply to this note

Please Login to reply.

Discussion

Avatar
Vitor Pamplona 2y ago

But then do you keep GiftWraps wrapped and unwrap every time?

Avatar
hodlbod 2y ago

No, I unwrap. Unless we're talking about an authenticated account switcher, filtering is just a matter of showing the right information in the UI

Thread collapsed
Thread collapsed