After persisting the event in EventStore, each microservice can listen for every even, compute and update its latest state in the database. This way we can avoid the performance overhead of querying the event source and computing the latest state. If we want to recompute the current state from scratch, we can nuke the database and replay all the saved events from EventStore.
So, Why is it always suggested to read from the EventStore directly instead of saving the current state in the DB ?
Aucun commentaire:
Enregistrer un commentaire