verdverm
11/13/2025, 5:08 AMminimizeLatency and atLeastAsFresh
when no zookie is provided. This would mean I need to cache
a recent enough zookie in my backend and use that when none is provided.
1. Does this make sense?
2. Should I be concerned about this with respect to the New Enemy Problem?
3. Does the Node client support this out-of-the-box?
4. Is it better to middleware my call chain or listen to the event stream from SpiceDB?yetitwo
11/13/2025, 2:09 PMminimizeLatency and atLeastAsFresh when no zookie is provided
if you're using minimizeLatency then you don't need to be holding onto a zedtoken. i also think the question of "what happens the first time a user calls the application" kinda sidesteps the new enemy problem - the new enemy problem is asking "what happens if i lose access to something that i previously had access to?"
our recommendation if the new enemy problem is a concern is to store a zedtoken in the row that represents the object in question, and then when you want to determine whether a user has access to a thing, you fetch it from the DB and then make an at_least_as_fresh call with the zedtoken that you pulled out of the DB. this ensures that the check is made as of the last time the object is modified, which is sufficient to prevent the new enemy problem (and i can elaborate on the "why" of that if desired)verdverm
11/13/2025, 8:28 PM