GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-design-patterns/event-sourcing at master · tmollard/java-design-patterns

Expand file tree

/

event-sourcing

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

event-sourcing

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
etc
etc
 
 
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline
layout pattern
title Event Sourcing
folder event-sourcing
permalink /patterns/event-sourcing/
categories Architectural
tags
Performance
Cloud distributed

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.

Class diagram

alt text

Applicability

Use the Event Sourcing pattern when

  • 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)
  • Event Sourcing pattern
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.