What's the point in a local relay? Is it a cross-client cache that is regularly flushed or place to store only important events? nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z's Amethyst and nostr:npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr 's Nostudel both support them.

eg. android: Citrine by nostr:npub1w4uswmv6lu9yel005l3qgheysmr7tk9uvwluddznju3nuxalevvs2d0jr5; desktop: nostr-relay-tray by nostr:npub1tsjtf54cla7n8u7e7ghn6sy0parassxdfujs6phspzy98h3kqy4qqpqm8t

Reply to this note

Please Login to reply.

Discussion

The biggest advantage currently is having a local backup of your relays and follow lists and some of your notes. At least that's kind of how I'm seeing it. Considering some apps still occasionally break follow and relay lists. I'm sure there are other advantages that I'm missing but I'm not fully caffeinated yet. 😅

Yes. I can't believe this pain point still exists. It shouldn't be that hard to solve yet we as a developer community haven't sovled it.

I hope someone will correct me if I'm wrong, but now that amethyst has implemented drafts, I think it will also save your drafts on the local relay, making them a little bit more private than pushing them out to any other relay.

But yeah, preaching to the choir on that last point. 😅

Local backups, saving space, access to you data offline.

Let's say you use 10 apps and each app uses 1gb of space.

If those 10 apps used the local relay they would all just use 1 gb.

Local relays could also implement something to be used as a proxy relay reducing the number of connections an app needs to make

Is there a mechanism for a client to indicate an event can be flushed from the relay?

Not at the moment

ndk supports the use of client or server-side caches. It currently stores every event it receives and begins flushing older(?) events when it reaches a configurable limit of 10,000.

I think a cache adapter for a local relay would be nice. It could simply look for a local relay on localhost:4869 and use that if it exists; optionally fallbacking to the in-browser dexie adapter.

What do you think nostr:npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc nostr:npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft?

Thanks for your work on both this and Amber btw