Hacker News new | past | comments | ask | show | jobs | submit login

My coworkers call it "data integrity". At best it's a local maximum for consistency. Right now it's how we reject true facts about the business. Our partner bank tells us a customer deactivated? Our database says "no", someone gets a 500, and we get a support ticket when the customer can't sign up again (because they're still in our system).



If this is a common problem, you should have some sort of "dead letter queue" where events like this can be held until your data model is updated to accept them.


Yep, I keep the dead events around, for when the constraints behave incorrectly.

I also keep the live events around, in case there isn't a constraint exception, but something else goes wrong - upstream/user error causing deletion, or programmer error causing the event to have the wrong effect.

Now I have the events, I can just throw away the schemas and constraints. I mean, if the events and the DB disagree, the DB is wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: