jb55 on Nostr: Users define what relays they read from and write to in their relay list. Then ...
Users define what relays they read from and write to in their relay list. Then clients know where to send notes when tagging specific people. Clients then also know where to read notes from when pulling their profile feed.
Timelines are a bit more tricky: you have to gather everyone you follow’s relay list somehow, then find the common relay subsets among all of them:
Alice, bob and jack are writing to relay A
Tom, Jerry are writing to relay B
phil is writing to A,C
Then your timeline feed is:
subscribe on A to alice,bob,jack,phil
subscribe on B to tom, jerry
With an algorithm that minimizes the total relays you connect to.
You’re also hoping these relays are reliable and have decent uptime.
Overall it might save a bit of upload bandwidth when querying, but it makes your client connect to a bunch of random relays that other users have defined in their profile. Many of which might be offline, unreliable or malicious. So you need to make sure your client is hardened against bad relays.
The dumbest way of doing it is damus’ original model that just reading and writing to relays in your relay list. It’s much simpler client-logic-wise but you have to manually add/remove relays to stay overlapped with your friends.
Published at
2024-04-03 20:35:17Event JSON
{
"id": "0f87dd84a0550281905283c16cf2437a670d38fea7319afa195603218db45501",
"pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"created_at": 1712176517,
"kind": 1,
"tags": [
[
"e",
"e47fe822fe6d0a2e1e3f394bf14a5162fa4ba59cde0d422bd234d348ec573dcd"
],
[
"p",
"1577e4599dd10c863498fe3c20bd82aafaf829a595ce83c5cf8ac3463531b09b"
]
],
"content": "Users define what relays they read from and write to in their relay list. Then clients know where to send notes when tagging specific people. Clients then also know where to read notes from when pulling their profile feed.\n\nTimelines are a bit more tricky: you have to gather everyone you follow’s relay list somehow, then find the common relay subsets among all of them:\n\nAlice, bob and jack are writing to relay A\nTom, Jerry are writing to relay B\nphil is writing to A,C\n\nThen your timeline feed is:\n\nsubscribe on A to alice,bob,jack,phil\nsubscribe on B to tom, jerry\n\nWith an algorithm that minimizes the total relays you connect to.\n\nYou’re also hoping these relays are reliable and have decent uptime.\n\nOverall it might save a bit of upload bandwidth when querying, but it makes your client connect to a bunch of random relays that other users have defined in their profile. Many of which might be offline, unreliable or malicious. So you need to make sure your client is hardened against bad relays.\n\nThe dumbest way of doing it is damus’ original model that just reading and writing to relays in your relay list. It’s much simpler client-logic-wise but you have to manually add/remove relays to stay overlapped with your friends.",
"sig": "33b9d4034ad82b32ffce001242054bf6b1448ddc637d302369aae69b72a51b38d4d6c22aadb23af5473f6e1dc466cd03b55f06891f8324aa3690adc497a27cc9"
}