hi, guys, may i ask, how do you list
# spicedb
i
hi, guys, may i ask, how do you list resources that is viewable by a user with spicedb, it's a very common, but I cannot seem to find a good resource on this. Consider that a set of documents is organized into a tree of directories, and a user want to list all the files he can view, do I LookupResorces and inject the returned ids into my sql with something like
where .. in (id1, id2)
, performance issue on sql asside, it seems that we cannot control the order of the returned ids (for pagination), or is there a better way?
if you can't consume all of the IDs at once, it probably makes sense to overfetch and then postfilter.
i
Thanks for the help! To be honest I don’t have confidence in any of the three options, not nitpicking or something, just some guess work, and I appreciate the open source effort, logically the most easiest one is the materialized approach, but I can imagine the materialized table quickly blowing, the check bulk requires looping through the databases. Again these are just guesses, no disrespect intended, I suppose a experiment is needed to figure out which option is appropriate performance wise for each use case
y
if you're using an external source of authorization i'm not really sure what the alternatives would be if you want fine-grained authorization and the semantics that zanzibar affords 🤷
we used both the CheckBulk and LookupResources approaches at my old company and they worked fine
2 Views