Projections in Event Sourcing are a way to derive current state from an event stream. This can be done asynchronously as events are persisted to an event stream which can update a projection. You donβt need to replay all the events in an event stream to get to current state for a UI every time you need to display data. This could be very inefficient if you have a lot of events in a stream. Rather, create a projection that represents current state and keep it updated as events occur.
π Subscribe: https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw?sub_confirmation=1
π₯ Join this channel to get access to source code, demos, and slides!
https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw/join
π Blog: https://codeopinion.com/projections-in-event-sourcing-build-any-model-you-want/
π Book Recommendations
Domain-Driven Design
https://amzn.to/2QwG8sb
Patterns of Enterprise Application Architecture
https://amzn.to/3d8kMJj
Refactoring: Improving the Design of Existing Code
https://amzn.to/2NVdP5Q
Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith
https://amzn.to/3srUuZ6
RESTful Web Clients: Enabling Reuse Through Hypermedia
https://amzn.to/3d8Q96B
0:00 Intro
1:23 Projections Explained
4:01 Publish/Subscribe
6:42 Code Implementation Example
CodeOpinon: https://codeopinion.com
Twitter: https://twitter.com/codeopinion
#eventsourcing #softwarearchitecture #softwaredesign
#eventsourcing #softwarearchitecture #softwaredesign