Read Models can provide snapshots of the application state at a point in time


Last Updated on Feb 12, 2021

When combined with the Event Sourcing pattern, Read Models can act as snapshots of the system at a specific point in time. Events can be re-applied from scratch in the order they were received to bring the application to the desired state.

If changes are directly applied to the system, objects lose their history. It becomes impossible to understand how an object arrived at the state it is currently in.

There is no information loss if all changes entering the system are stored as events. If events drive all further processing, a system's state can be reconstructed to any point in the past.

This not only preserves the information sanctity in the system but is also invaluable in debugging issues in high volume, high concurrency scenarios. The system can be bought to a point just before a problem occurred and one can walk through the event processing to get to the root of the issue.

Say the analysis led to discovering a bug in the business logic. In that case, it is also easier to correct the system because the event can simply be reprocessed after the fix has been applied. Data in Read Models is expendable, so they can be quickly rebuilt from scratch.


© 2022 Ambitious Systems. All Rights Reserved.