Conversation
implement of object data storage
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
How does this solve the dual-write problem? SpiceDB is not and will not be a good key/value store - it's optimized around the access patterns of permission checks. It won't make a good application database and we don't necessarily want to encourage folks using it that way. |
|
@andriyko I wanted to reopen this and say that we appreciate the work that you put into this and that my question was genuine - I don't want to dismiss what you've put forward out of hand. |
|
I chatted with Andriy out of band - I do think this solves an interesting problem that SpiceDB doesn't otherwise have a solution for, which is using SpiceDB without dealing with the dual-write problem. Perhaps this idea could be turned into an optional extension of SpiceDB? I'm going to re-close in the meantime, though. |
This PR introduces object data support to SpiceDB, allowing storage and retrieval of arbitrary object metadata alongside relationships. This feature aims to solve the dual-write problem of maintaining consistency between SpiceDB and application databases.
Related PRs:
authzed/api#136
authzed/authzed-go#311
Background
Several feature requests in SpiceDB relate to the dual-write problem:
Features
Storage Layer (Note: PostgreSQL only)
object_datatable using PostgreSQL JSONB typeresourceandsubjectobject metadataAPI Extensions
Implementation Details
Migration
The changes are backward compatible:
object_datatableExample Usage
Write schema
Write relationships
Read relationships
Lookup operations
Export relationships
Import relationships