mleku on Nostr: just separating subscriptions and queries alone makes a huge difference because you ...
just separating subscriptions and queries alone makes a huge difference because you don't need to keep a socket data structure and thread live all the time, you just spin one up each time there is request
the majority of nostr queries are not subscriptions but the client has to explicitly close them all the time
Published at
2025-04-24 12:49:18Event JSON
{
"id": "fcd1d640cd75bd34a5aea09fc83b0256b7d24e90bc90295c4a6d1f785f1d5960",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1745498958,
"kind": 1,
"tags": [
[
"e",
"101c25f684bc368fda0b96d860b9f12c438e4778d3cc6168a1127cb3c39586fc",
"",
"root",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"e",
"fc9bc2c96e901e902b4724dd90647778d4ed60edb08242227ba06eface936291",
"wss://inbox.relays.land/",
"reply",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"p",
"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b"
],
[
"p",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
]
],
"content": "just separating subscriptions and queries alone makes a huge difference because you don't need to keep a socket data structure and thread live all the time, you just spin one up each time there is request\n\nthe majority of nostr queries are not subscriptions but the client has to explicitly close them all the time",
"sig": "9c89b1d1554a8fd26c2838d39f130f38f58183898aafc8273f7058adce4ccd352f6a2be57bef7f56e8aaba162688dc3868f950e16255ddbd6206cab651f5b401"
}