Skip to content

Latest commit

 

History

History
82 lines (51 loc) · 6.22 KB

File metadata and controls

82 lines (51 loc) · 6.22 KB
graph LR
    Application_Services["Application Services"]
    Domain_Model["Domain Model"]
    Repository["Repository"]
    Event_Persistence_Layer["Event Persistence Layer"]
    Event_Consumption_Layer["Event Consumption Layer"]
    Application_Services -- "Issues Commands To" --> Domain_Model
    Domain_Model -- "Emits Events To" --> Application_Services
    Application_Services -- "Uses To Load/Save Aggregates" --> Repository
    Repository -- "Persists Events/Snapshots To" --> Event_Persistence_Layer
    Repository -- "Retrieves Events/Snapshots From" --> Event_Persistence_Layer
    Application_Services -- "Publishes Events To" --> Event_Consumption_Layer
    Event_Consumption_Layer -- "Reads Events From" --> Event_Persistence_Layer
    click Application_Services href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/eventsourcing/Application_Services.md" "Details"
    click Event_Persistence_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/eventsourcing/Event_Persistence_Layer.md" "Details"
    click Event_Consumption_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/eventsourcing/Event_Consumption_Layer.md" "Details"
Loading

CodeBoardingDemoContact

Details

The eventsourcing project implements an Event Sourcing pattern, centralizing around a Domain Model that emits Domain Events. Application Services act as the command handlers, orchestrating interactions with the Domain Model and persisting events via the Repository into the Event Persistence Layer. The Event Consumption Layer provides read-only access to these events, enabling the construction of read models and the execution of long-running processes. This architecture ensures a clear separation of concerns, with data flow primarily originating from commands in Application Services, flowing through the Domain Model to generate events, and then being persisted and subsequently consumed for various purposes.

Application Services [Expand]

The primary entry point for commands, orchestrating interactions between the domain model and persistence. Manages the lifecycle of aggregates and publishes events.

Related Classes/Methods:

Domain Model

Encapsulates core business logic, state, and behavior. Aggregates enforce invariants and are the source of truth for Domain Events.

Related Classes/Methods:

Repository

An abstraction layer for loading and saving Domain Aggregates, mediating between Application Services and the Event Persistence Layer.

Related Classes/Methods:

Event Persistence Layer [Expand]

The foundational layer for storing and retrieving Domain Events and Snapshots. Includes the Event Store, Snapshot Store, Event Mapper/Transcoder for serialization, Security/Cipher for encryption, and pluggable Persistence Adapters.

Related Classes/Methods:

Event Consumption Layer [Expand]

Provides a read-only stream of all recorded events (Notification Log) for consumers like Projections (for read models) and Process Managers (for long-running processes).

Related Classes/Methods: