Doug Hoyte on Nostr: Yes, I have seen nostrdb. I think it's a great idea, and that it will be a big ...
Yes, I have seen nostrdb. I think it's a great idea, and that it will be a big benefit for native clients. Let me know if I can help in any way!
I was thinking about it a bit and maybe flatbuffers is a bit overkill for the indexed nostr events in strfry, and I'm working on a branch that uses a custom event representation similar to nostrdb. I usually use flatbuffers by default because the generated code is convenient and it's easy to evolve the schema in a backwards compatible way. Also it comes with some nice utilities for debugging and securely parsing untrusted data (not needed here).
BUT the core nostr event layout is pretty much fixed and saving some space here is important not least because it will let us pack more records into the page cache. I'll keep you posted on how that goes. Cheers!
Published at
2023-09-13 00:10:43Event JSON
{
"id": "aa96023948558eaa1652a7904e637f2b436278d213c5efae8fff2c6120b10914",
"pubkey": "218238431393959d6c8617a3bd899303a96609b44a644e973891038a7de8622d",
"created_at": 1694563843,
"kind": 1,
"tags": [
[
"e",
"0ac14895356511ee786de1fb0c20cd7c3351fa216663dc1999e882b7db02b953",
"",
"root"
],
[
"e",
"c271cae3253fe58c499c5ab2cbe140387f9fa79a06a2d14508f8ed812c556f36",
"",
"reply"
],
[
"p",
"218238431393959d6c8617a3bd899303a96609b44a644e973891038a7de8622d"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
]
],
"content": "Yes, I have seen nostrdb. I think it's a great idea, and that it will be a big benefit for native clients. Let me know if I can help in any way!\n\nI was thinking about it a bit and maybe flatbuffers is a bit overkill for the indexed nostr events in strfry, and I'm working on a branch that uses a custom event representation similar to nostrdb. I usually use flatbuffers by default because the generated code is convenient and it's easy to evolve the schema in a backwards compatible way. Also it comes with some nice utilities for debugging and securely parsing untrusted data (not needed here).\n\nBUT the core nostr event layout is pretty much fixed and saving some space here is important not least because it will let us pack more records into the page cache. I'll keep you posted on how that goes. Cheers!",
"sig": "361c560f6f68027d049aa659e4eaa185497a150467e1841136a722a652219ed0717dfdd42c7e8dd486cbeec93afb153ebb6da4e08da1062bd48bd05c27ffc72a"
}