I believe amethyst and many other clients actually just run ...

npub15r9hp5eq3a0heantnja4sth3ug277nhse9f3scu937mxfh0mpw8snt7dpl
hex
8980ba0fbb883e0de7c0504b205b2e1edc42875fe74dee011f5ff50ebaee361fnevent
nevent1qqsgnq96p7acs0sdulq9qjeqtvhpahzzsa07wn0wqy04lagwhthrv8cprpmhxue69uhhyetvv9ujuem4d36kwatvw5hx6mm9qgs2pjms6vsg7hmu7e4eew6c9mc7y900fmcvj5ccvwzcldnymhashrcdc76u3Kind-1 (TextNote)
↳ Reply to Event not found
bfd2bae66e1dc53396932bb69999b4d02d590ca1c0561c817420be666e5f5656...
I believe amethyst and many other clients actually just run a local relay. They hold a local database of posts, and all read requests are first synced to the local database. Then when you publish a note, it gets sent to the local relay like all the others, that's why it shows up in your feed immediately.
This is a much better architecture IMO than not having it, since often times you will switch between screens while trying to show a lot of the same notes, and you don't have to re-request the same notes, or hard code the logic to pass notes up and down your app like a monkey.
There are many different use cases that you can add to your app very easily with this architecture that would be a code nightmare to add without it.
It does have the effect of an optimistic ui update, which is a good thing imo, and you can just do the upload confirmation modal that yakihonne does to avoid the situation Yusuf is facing where you think it worked when it didn't.
Raw JSON
{
"kind": 1,
"id": "8980ba0fbb883e0de7c0504b205b2e1edc42875fe74dee011f5ff50ebaee361f",
"pubkey": "a0cb70d3208f5f7cf66b9cbb582ef1e215ef4ef0c9531863858fb664ddfb0b8f",
"created_at": 1777571336,
"tags": [
[
"alt",
"A short note: I believe amethyst and many other clients actually..."
],
[
"e",
"b1dbaadba6315c19e1f7d710b8d00618220ea68c1241b0c6ee5a8d732deec2a7",
"wss://noornode.nostr1.com/",
"root",
"f527cf970ce260e74261214bf612e8f75a59db1835ed7e4053326c3f65e232ee"
],
[
"e",
"0397b46d80d37827de17c3be9883bae2bc0c0825c6be8e454ec5a457a6c7aaf8",
"wss://noornode.nostr1.com/",
"",
"5ab57a9e78a0a0d1187afcfc2d4d7d2f82a572b16e517a924f66886ff2d43cb7"
],
[
"e",
"bfd2bae66e1dc53396932bb69999b4d02d590ca1c0561c817420be666e5f5656",
"wss://noornode.nostr1.com/",
"reply",
"f527cf970ce260e74261214bf612e8f75a59db1835ed7e4053326c3f65e232ee"
],
[
"p",
"5ab57a9e78a0a0d1187afcfc2d4d7d2f82a572b16e517a924f66886ff2d43cb7",
"wss://nostr.bitcoiner.social/"
],
[
"p",
"f527cf970ce260e74261214bf612e8f75a59db1835ed7e4053326c3f65e232ee",
"wss://nos.lol/"
],
[
"client",
"Amethyst"
]
],
"content": "I believe amethyst and many other clients actually just run a local relay. They hold a local database of posts, and all read requests are first synced to the local database. Then when you publish a note, it gets sent to the local relay like all the others, that's why it shows up in your feed immediately. \n\nThis is a much better architecture IMO than not having it, since often times you will switch between screens while trying to show a lot of the same notes, and you don't have to re-request the same notes, or hard code the logic to pass notes up and down your app like a monkey. \n\nThere are many different use cases that you can add to your app very easily with this architecture that would be a code nightmare to add without it. \n\nIt does have the effect of an optimistic ui update, which is a good thing imo, and you can just do the upload confirmation modal that yakihonne does to avoid the situation Yusuf is facing where you think it worked when it didn't. ",
"sig": "65b51d84ec65d210c3973f57232ea33729be35924e17db3c27e09acd1e777f61474669246ca9af16c18865b14a5705681fab88216abdeb6c526633e61db23773"
}