08/28/2021, 10:32 PM
Hey, I was wondering if I could get some advice on state management. Introducing authzed into my app means most write ops becomes a double commit transaction to sync state between my application db and authzed. I understand that authzed is designed for high availability but I still need to handle the case where 1) I successfully write data to the application db but 2) fail to update state in authzed (for whatever reason). I can either rollback the app db write or introduce the concept of visibility to my application data. Essentially fresh app db writes would be "hidden" until authzed succeeds at which point the changes could be made visible. Any advice? Am I thinking about the problem correctly?