amos on Nostr: Looks good to me. The connection process can deal with receiving events, and then ...
Looks good to me. The connection process can deal with receiving events, and then just send them to the relevant subscription GenServer to be processed. You can have a dynamic supervisor for the connection processes and another one for the subscription processes and you can use a registry to keep track of all the processes.
Published at
2023-03-06 01:01:20Event JSON
{
"id": "65cc9f9a5fefeb83fd431e3d1f7b86e3be63c1f24840a4d9af148c654069075a",
"pubkey": "9e87fe21542cef6b1076334f5e01f614cbc5bea223187b078deb47c2f72205b6",
"created_at": 1678060880,
"kind": 1,
"tags": [
[
"e",
"9ba62f559a54ed5d8044336f70bbf9528f86315b032f9e1bc0ce67e559e8aa92",
"",
"root"
],
[
"e",
"cd2c63128f82232afaa9829ef4385839484d54bcfc8a64e5c9f09453416fe5ec",
"",
"reply"
],
[
"p",
"9e87fe21542cef6b1076334f5e01f614cbc5bea223187b078deb47c2f72205b6"
],
[
"p",
"9e87fe21542cef6b1076334f5e01f614cbc5bea223187b078deb47c2f72205b6"
],
[
"p",
"52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd"
]
],
"content": "Looks good to me. The connection process can deal with receiving events, and then just send them to the relevant subscription GenServer to be processed. You can have a dynamic supervisor for the connection processes and another one for the subscription processes and you can use a registry to keep track of all the processes.",
"sig": "82905d1fecd23145553e3b621f54f163d6280500dff9fc855125208c9e848715fd9d2b7a8465cab19d4903f3a9516ef4503c755b39e5eea40b28b63d0c8d188d"
}