diff --git a/event-sourcing/README.md b/event-sourcing/README.md index c513d2da9..1079405fa 100644 --- a/event-sourcing/README.md +++ b/event-sourcing/README.md @@ -3,7 +3,7 @@ layout: pattern title: Event Sourcing folder: event-sourcing permalink: /patterns/event-sourcing/ -categories: Concurrency +categories: Architectural tags: - Java - Difficulty Intermediate @@ -11,11 +11,23 @@ tags: --- ## Intent +Instead of storing just the current state of the data in a domain, use an append-only store to record the full series of actions taken on that data. The store acts as the system of record and can be used to materialize the domain objects. This can simplify tasks in complex domains, by avoiding the need to synchronize the data model and the business domain, while improving performance, scalability, and responsiveness. It can also provide consistency for transactional data, and maintain full audit trails and history that can enable compensating actions. + +![alt text](./etc/event-sourcing.png "Event Sourcing") ## Applicability Use the Event Sourcing pattern when -* You have a limited accesibility resource and the asynchronous process is acceptable to reach that +* You need very high performance on persisting your application state even your application state have a complex relational data structure +* You need log of changes of your application state and ability to restore a state of any moment in time. +* You need to debug production problems by replaying the past events. + +## Real world examples + +* [The Lmax Architecture] (https://martinfowler.com/articles/lmax.html) ## Credits +* [Martin Fowler - Event Sourcing] (https://martinfowler.com/eaaDev/EventSourcing.html) +* [Event Sourcing | Microsoft Docs] (https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing) +* [Reference 3: Introducing Event Sourcing] (https://msdn.microsoft.com/en-us/library/jj591559.aspx) diff --git a/event-sourcing/etc/event-sourcing.png b/event-sourcing/etc/event-sourcing.png new file mode 100644 index 000000000..ac7192b19 Binary files /dev/null and b/event-sourcing/etc/event-sourcing.png differ diff --git a/event-sourcing/etc/event-sourcing.ucls b/event-sourcing/etc/event-sourcing.ucls new file mode 100644 index 000000000..d187b1bb0 --- /dev/null +++ b/event-sourcing/etc/event-sourcing.ucls @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file