Is it possible to have Objects as Subject Sets? #767
-
Disclaimer: I'm super new to Keto, like a few days. So ELI5 please. It is best described with an example: Requirements
Initial setupthis part will be the same for both solutions
Current Solutionreaders can read
writers can write
number of api calls:
Proposed Solutionfiles are children of a directory
readers can read
writers can write
number of api calls:
Final WordsMainly wondering if this can be done or if there are limitations with the graph algorithms that don't make this possible. Or if there is a similar way to achieve this. I'm trying to avoid having to make so many api calls when there could be many relations to a given object. For instance say I had reader, writer, sharer, deleter, I'd have to make 4 relation tuples each time I created a file. I think it is also worth mentioning, I am trying to preserve the hierarchy via Keto which maybe is a smell. Meaning I want users to have "roles" at a directory level that cascade into the child objects. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
FYI, just converted to discussion as I think it is rather a discussion instead of issue 😉 The proposed solution is not going to be very performant in the end as it enables to build very complex graphs that have many paths. Instead, the idea would be to have the |
Beta Was this translation helpful? Give feedback.
FYI, just converted to discussion as I think it is rather a discussion instead of issue 😉
The proposed solution is not going to be very performant in the end as it enables to build very complex graphs that have many paths. Instead, the idea would be to have the
child
or aparent
relation (depending on your needs) as you proposed, but then use subject set rewrites to define that you have "read when you have read to the parent" (#263 and other issues). This basically means that you only need# of files
API calls. Note that unfortunately rewrites are currently not yet implemented, and you need to use the workaround you proposed in very beginning.