derwolfe
06/28/2022, 4:05 PMJoey
06/28/2022, 4:11 PMJoey
06/28/2022, 4:11 PMJoey
06/28/2022, 4:12 PMtartignolle
06/29/2022, 1:20 PMdefinition sample/registration {
relation learner: sample/student;
relation target: sample/formation;
permission subscribe = (target->subscribe & learner->subscribe) + learner->self
}
Is it possible to use parenthesis to priorize the operations ?
Otherwise, how can we do this kind of things in rebac ?
Thanks (sorry for the noob question !)Joey
06/29/2022, 2:10 PMJoey
06/29/2022, 2:10 PMtartignolle
06/29/2022, 2:25 PMAlexB
06/30/2022, 10:13 AMview
a folder if they can view
ALL files in that folder (files and folders are used just as an example, the actual entities are a bit different). Any help would be much appreciated.Tomek
06/30/2022, 2:17 PMJoey
06/30/2022, 2:27 PMJoey
06/30/2022, 2:27 PMAlexB
06/30/2022, 6:07 PMdefinition user {}
definition folder {}
definition file {
relation parent: folder
relation viewer: user
permission view = viewer
}
I don't see a way to define a permission for the folder that would depend of its files
and if I define it like this
definition user {}
definition folder {
relation contents: file
permission view = contents->view
}
definition file {
relation viewer: user
permission view = viewer
}
the view
permission for a folder will be granted when any file is viewable (while I want that all of them are)Joey
06/30/2022, 6:08 PMJoey
06/30/2022, 6:09 PMAlexB
06/30/2022, 6:14 PMJoey
06/30/2022, 6:14 PMAlexB
06/30/2022, 6:22 PMJoey
06/30/2022, 6:34 PMJoey
06/30/2022, 6:34 PMAlexB
06/30/2022, 7:28 PMJoey
06/30/2022, 9:57 PMwilliamdclt
07/01/2022, 9:34 AMSERIALIZABLE
(https://github.com/authzed/spicedb/pull/581/files#diff-cc7f4962fde0ca83da82d95e2d7e23f00084437867c3cbe61eb70b4509576496R288). It's very problematic for me: I direct all the checkPermission
without a zedToken to a read replica (AWS Aurora), and read replicas do not support the SERIALIZABLE
level (see last point in https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CAVEATS).
This means that I can't use a read replica at all with 1.8.0, which means I lose a lot of reliability and horizontal scalability 😬
I suppose the goal was to avoid unrepeatable reads? Could we use the REPEATABLE READ
isolation level?williamdclt
07/01/2022, 9:39 AMzi
is an alias for zed
)Joey
07/01/2022, 3:01 PMwilliamdclt
07/01/2022, 3:05 PMminimizeLatency
, it queries a spicedb service that's using a read-replica, otherwise it sends it to another spicedb service that's using the master DBJoey
07/01/2022, 3:40 PMwilliamdclt
07/01/2022, 3:50 PMSERIALIZABLE
level? SpiceDB wasn't using it until 1.8.0
- We could set SERIALIZABLE
for write requests (eg writeRelationships
), and REPEATABLE_READ
for read requests? REPEATABLE_READ
should always be enough for readonly requests, if I'm not mistaken
> Would you be interested in potentially formalizing the read replica support in SpiceDB, such that it picks the read replica if consistency allows for it?
I would be interested, but I'm worried about not being able to allocate time to that 😅 What do you have in mind, some sort of design document describing read replica support in SpiceDB-with-Postgres?Joey
07/01/2022, 4:20 PMJoey
07/01/2022, 4:21 PM