outbox模型我感觉不太好用,要连的中继太多了,尤其是广场上的帖子,几乎可以说要连接到所有中继了。。。
Outbox is harder than it should be just because devs make their first versions with a hardcoded relay list expecting that later they will just "add outbox".
Nah... you won't. You fucked up. Now you need to rewrite everything because your architecture cannot handle it. It's as simple as that.
Outbox requires many layers of indirections: Before loading the feed, you need to load the NIP-65 event, and before loading the NIP-65 event you need to figure out the user's home relay to get the most up-to-date NIP-65 event from. You will need to setup those layers from the beginning.
More importantly: your relay pool will change from post to post. You will need to quickly disconnect and connect to relays as the use slides through their feed.
To see all replies of a thread, you will connect to all of the inbox relays of each participant in that thread. That's the only way to see everything.
The same pool must keep Bunker connections alive at all times and randomly connect to Nostur Wallet Connect relays to send zaps.
If you are crazy enough to implement multiple NIPs, like Amethyst and Nostur do, each NIP will have their own ways of defining which list should be used. You will need different bootstrapping relays for each NIP.
Our nostr libraries are terrible. They are almost all still based in the old thinking of a fixed relay pool. Even the modern AI stuff from @Alex Gleason still uses fixed relay lists. That will drive your code into a direction that will be very hard if not impossible to fix later.
We can fix this. But it is hard to fix when every client also operates a main relay to centralize things on. Things get built around that relay and people forget to decentralize. It's sad. But this error is so common that it's not even fun anymore.
Every client needs to help users setup their relay lists. Every client MUST use the user's relay lists that other clients already helped him/her setup. Ignoring the user settings from a different client will only make your code unfixable overtime.
The happy path is evil. And if you go down into that direction, it will consume your soul.
View quoted note →