The Core Idea
Deep learning relies on representing data across layered feature spaces.
Instead of directly storing the current state of an application, Event Sourcing focuses on recording every change as an immutable event.
Projection: Read Model Created from Events
Snapshot: A stored state is taken to optimize read performance.
Event Sourcing allows you to create optimized read models (projections) by applying the events in chronological order.
Natural fit for event-driven architecture
Decoupling write and read models allows independent scaling of both sides.
Aggregate Implementation: Event Sourcing provides a robust way to manage aggregates by capturing all changes as events.
Frequently asked questions
What is deep learning?
Deep learning is a family of machine learning methods that use multi-layer neural networks.
What is Event Sourcing?
Event Sourcing is a technique for managing application state by recording all changes as a sequence of events.
Why use versioning for events?
Versioning allows you to maintain backward compatibility between event versions. This ensures that older events can still be replayed correctly, even as the system evolves.
How should I handle deleting data in an Event Sourced application?
Instead of directly deleting data, create a 'deletion' event. This preserves the audit trail and allows you to potentially ‘undelete’ the data if needed.
How does Event Sourcing fit with CQRS (Command Query Responsibility Segregation)?
Event Sourcing naturally aligns with CQRS because events generated from commands are used to create read models. This separation allows independent scaling and optimized data models for both reading and writing.
How should I test aggregate behavior in an Event Sourced application?
Test aggregate behavior by simulating commands and verifying the generated events. Also, thoroughly test event replay, projection accuracy, concurrency control, and event versioning migration scenarios.
▶ Try it live
Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.