Open olleharstedt opened 2 years ago
Instead of writing to the database or file, create an event or closure to deal with it later.
https://martinfowler.com/eaaDev/EventSourcing.html
Another post about similar concept: https://spin.atomicobject.com/2018/02/08/defer-side-effects/
Cats effects for Scala: https://typelevel.org/cats-effect/docs/2.x/datatypes/io
Instead of writing to the database or file, create an event or closure to deal with it later.
https://martinfowler.com/eaaDev/EventSourcing.html