From the course: Building Event-Driven Applications In Go

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Event sourcing and CQRS (Command Query Responsibility Segregation)

Event sourcing and CQRS (Command Query Responsibility Segregation)

From the course: Building Event-Driven Applications In Go

Event sourcing and CQRS (Command Query Responsibility Segregation)

- [Instructor] Event sourcing and command query responsibility segregation, or CQRS, are two powerful patterns that can enhance the scalability and performance of your applications. What is event sourcing, you may ask? If you are not familiar with this concept, event sourcing is a pattern where state changes in the system are stored as a sequence of events. With event sourcing, instead of persisting the current state directly, each change is recorded in your event log or event store as an immutable event. The system state at any point in time can then be reconstructed by replaying these events. At a high level, event sourcing is just the observation that events, that is, state changes, are a core element of any system, and so if they're stored immutably in the order in which they're created, then the resulting event log will provide a comprehensive audit of exactly what happened to the system and what it did. What's more, we can always derive the current state of the system by…

Contents