Hacker News new | ask | show | jobs
by dastbe 1438 days ago
imo i would add to your docs more details around what to do when you ex. update a relationship but fail to persist a zedtoken, or at least the options and what the ramifications are. these are things that people may not truly reason through and your team has the most context on how these decisions can affect user experience.
1 comments

Thanks. This is great feedback. We've written a blog post[0] about some of strategies developers are using to write relationships, but we haven't covered explicitly the failure scenarios.

For the scenario that you've described, you should be able to retry persisting the zedtoken, but if there's some fundamental reason that's not working, you can always perform a fully consistency check and persist the resulting value -- fresher zedtokens are always safe.

[0]: https://authzed.com/blog/writing-relationships-to-spicedb/