From the course: Building Event-Driven Applications In Go
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Implementing event sourcing in Go
From the course: Building Event-Driven Applications In Go
Implementing event sourcing in Go
- [Instructor] Event sourcing is a powerful pattern in software design where state changes in your system are captured as a sequence of events. What we are used to is that we persist the current state directly, but with event sourcing, we persist every change to the state of the domain object as an immutable event. Now, this pattern provides the benefit of allowing us perform complete audit trails. It also allows us the ability to replay the events to recreate a past state. It helps you view the state of change at each point in time, and also very, very importantly, helps with simplified debugging. In this video, I will briefly introduce you to the concept of event sourcing, and we will get our hands on a very, very simple coding example. So first of all, why do we need event sourcing and what's it for? What's the importance of it? Firstly, as I said earlier, auditability. With event sourcing, every state changes recorded providing a full history of the system state. Also…