dimanche 21 mars 2021

design pattern for undoing after I have commited the changes

We can undo an action using Command or Memento pattern.

If we are using kafka then we can replay the stream in reverse order to go back to the previous state.

For example, Google docs/sheet etc. also has version history.

in case of pcpartpicker, it looks like the following:

enter image description here

For being safe, I want to commit everything but want to go back to the previous state if needed.

I know we can disable auto-commit and use Transaction Control Language (COMMIT, ROLLBACK, SAVEPOINT). But I am talking about undoing even after I have commited the change.

How can I do That?

Aucun commentaire:

Enregistrer un commentaire