Skip to content

Conversation

@adinhodovic
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 4:29pm

@github-actions
Copy link

github-actions bot commented May 13, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@tstirrat15 tstirrat15 force-pushed the best-practises-spicedb branch from 32d47cf to 7579839 Compare May 15, 2025 18:36
@tstirrat15 tstirrat15 marked this pull request as ready for review May 15, 2025 18:55
Signed-off-by: adinhodovic <hodovicadin@gmail.com>
@adinhodovic
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@miparnisari miparnisari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loved all these tips :)

Some examples:

- A banlist - this could be expressed as a list in caveat context, but it can also be expressed as a relation with negation.
- A notion of public vs internal - boolean flags seem like an obvious caveat use case, but they can also be expressed using self relations.
Copy link
Contributor

@miparnisari miparnisari May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a link for "self relations"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have that documentation yet 😓

Comment on lines 62 to 63
This is because caveats come with a performance penalty.
A caveated relationship is both harder to cache and also slows down computation of the graph walk required to compute a permission.
Copy link
Contributor

@miparnisari miparnisari May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to the top, before the examples. The fact that caveats affect performance should be front and center


While designing your authorization, it’s important to plan ahead for how quickly an update is guaranteed, while trading off performance via cache effectiveness.
By default, SpiceDB sets the Quanitzation Interval to 5s; check operations are cached within this window.
To change this value, set `--datastore-revision-quantization-interval` longer or shorter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that this sentence doesn't help me decide what value to use. A concrete example may help

@adinhodovic adinhodovic requested a review from tstirrat15 May 19, 2025 13:12
@adinhodovic adinhodovic removed the request for review from tstirrat15 May 19, 2025 13:12
Co-authored-by: Maria Ines Parnisari <maineparnisari@gmail.com>
tstirrat15 and others added 2 commits May 19, 2025 12:24
Co-authored-by: Maria Ines Parnisari <maineparnisari@gmail.com>
Co-authored-by: Maria Ines Parnisari <maineparnisari@gmail.com>
@tstirrat15 tstirrat15 merged commit 65c2254 into main May 20, 2025
10 checks passed
@tstirrat15 tstirrat15 deleted the best-practises-spicedb branch May 20, 2025 16:30
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants