Attributes
# spicedb
g
Hey folks, What is the advice to implement workspaces (think of Slack, Figma, notion...) in Spicedb? I would basically want to do something like, give me all the documents in this workspace that user can access. I can use caveats, but the [documentation discourages their usage](https://authzed.com/docs/spicedb/modeling/attributes) > In almost all cases, caveats should only be used when data required to evaluate a CheckPermission request is only available at the time of the request (e.g. user's current location or time of day). Using caveats for static data (e.g. a document's status) can have negative performance impacts. Static attribute data should always be modeled in the schema using patterns similar to those described above. Alternatively, I can use a specific user per workspace. But then, it's hard to keep the correct status up to date. For example, groups cheers
y
if you don't want users to be specific to workspaces, you'll need something like https://github.com/authzed/spicedb/issues/1317
g
correct, is that anywhere close in the road map? Would you recommend doing caveats now and waiting for that feature later? Maybe it would help to understand, how bad of a performance penalty caveats are
y
i think the way we're treating it right now is that it'll be a natural extension of the abilities of the query planner
which is in active development but is a fairly large project
most of the performance penalty you pay with caveats is that your cache hit rate goes down and there are some early-termination branches that you can't it
but it shouldn't be an order-of-magnitude slowdown
9 Views