From my perspective the application is the source ...
# spicedb
v
From my perspective the application is the source of truth for your business domain. It should have enough context to be able to walk the graph and issue a deletion for the whole subgraph transactionally. As for the race-y subfolder creation - don't we have the same challenge in the client application? Presumably you'd do something like "do not create this folder if the parent does not exist".
WriteRelationships
in SpiceDB expose preconditions as well so you could potentially do the same. The challenge here is that in SpiceDB there is not concept of "entities" - an entity exists if it's defined via a relationship, so you'd need to find an appropriate relation that allows you to make sure a folder exists.
2 Views