Doug Hoyte on Nostr: Hey guys, sorry for the delay! Just to clarify: You'd like it so a particular user ...
Hey guys, sorry for the delay!
Just to clarify: You'd like it so a particular user (authenticated in some way, maybe NIP-42?) can only access a subset of the keys in the DB?
I think that would be possible (assuming authentication is implemented of course). As Mike sas, it wouldn't be quite as easy as with SQL, where you could add a WHERE clause to all the required queries. However, I think you could do it in a way that wouldn't affect performance drastically.
If the sets of events for each user are mostly disjoint (not too many duplicated), then you could possibly run a strfry instance for each user. A running instance has a relatively low overhead, especially if you scale down the various thread counts.
Published at
2023-05-05 17:41:38Event JSON
{
"id": "a14dca9565ce6eecd626aedf67f16d0cc65dd116352d1aa2846f4168811331e6",
"pubkey": "218238431393959d6c8617a3bd899303a96609b44a644e973891038a7de8622d",
"created_at": 1683308498,
"kind": 1,
"tags": [
[
"e",
"f70d6db9005ce00a8abf314caa16463c8b1b0b2cc1fe8ecebc144d1823a0bd74",
"",
"root"
],
[
"e",
"0e0a73bc979705586bd08693b77a800045ca5d644cea63e88c0eeb9742a09276",
"",
"reply"
],
[
"p",
"0c99877612291bd818b3dd92f2852b823557b3744c3cb10470865c7a56a4929b"
],
[
"p",
"79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6"
],
[
"p",
"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49"
],
[
"p",
"2d5b6404df532de082d9e77f7f4257a6f43fb79bb9de8dd3ac7df5e6d4b500b0"
],
[
"p",
"1bc70a0148b3f316da33fe3c89f23e3e71ac4ff998027ec712b905cd24f6a411"
]
],
"content": "Hey guys, sorry for the delay!\n\nJust to clarify: You'd like it so a particular user (authenticated in some way, maybe NIP-42?) can only access a subset of the keys in the DB?\n\nI think that would be possible (assuming authentication is implemented of course). As Mike sas, it wouldn't be quite as easy as with SQL, where you could add a WHERE clause to all the required queries. However, I think you could do it in a way that wouldn't affect performance drastically.\n\nIf the sets of events for each user are mostly disjoint (not too many duplicated), then you could possibly run a strfry instance for each user. A running instance has a relatively low overhead, especially if you scale down the various thread counts.",
"sig": "7986ce3bd5de387ded9b338bca756142b1dbd5e3a04717e0c13a5c0fc5fdcf06f044a4bd8734b1aaca847cdea1a83d7189fdacabe199a903fe626856fbf43d9f"
}