Re:Ask HN: How would you implement an Undo functionality on ...
by nadima on Sunday June 07, 2020 @04:35PM
(#23450567)
Thanks for these resources.
It looks like all of them are for frontend-only cases though?
[ Parent
| on HN ]
Re:Ask HN: How would you implement an Undo functionality on ...
by bradwood on Sunday June 07, 2020 @06:21PM
(#23451449)
On the server-side you probably want some kind of transaction log or event sourcing / CQRS architecture...
The idea being that you don't write directly to a persistence layer (database) but rather that you trigger events onto some kind of queue. These events then persist in the queue for a time and then can be asynchronously acted upon. This allows for a number of interesting patterns, including undo, replay, etc.