The problem comes from the following story: You have an application that stores incoming data in a database. However someday you have noticed that your database schema is not quite well-designed or there was a problem with your computation all the time which you have just noticed. So how exactly you can migrate your existing data to your new database schema or calculate something with your fixed computation logic?
The answer is replaying the logs. What I would sug logic gest is, for every user action that affects your database, you should have a separate “log table” or “log file” which you can parse and replay very easily. It can help you to migrate our database or recover from serious application logic mistakes. I would call this an architectural pattern.
Let’s see how it may be helpful in a few cases: Read More →