graph LR
EventStore["EventStore"]
Mapper["Mapper"]
Cipher["Cipher"]
POPOEventStore["POPOEventStore"]
PostgresEventStore["PostgresEventStore"]
SQLiteEventStore["SQLiteEventStore"]
EventStore -- "delegates to" --> Mapper
POPOEventStore -- "inherits from" --> EventStore
PostgresEventStore -- "inherits from" --> EventStore
SQLiteEventStore -- "inherits from" --> EventStore
Mapper -- "delegates to" --> Cipher
POPOEventStore -- "composes with" --> Mapper
PostgresEventStore -- "composes with" --> Mapper
SQLiteEventStore -- "composes with" --> Mapper
The eventsourcing persistence subsystem is designed around the EventStore abstraction, which defines the core contract for event and snapshot storage. This allows for flexible and pluggable persistence mechanisms. Concrete implementations like POPOEventStore (in-memory), PostgresEventStore, and SQLiteEventStore extend this base, providing diverse storage options. The Mapper component plays a crucial role in data transformation, handling serialization, compression, and encryption of events before they are persisted. It delegates cryptographic operations to the Cipher component, ensuring data confidentiality. This architecture promotes a clear separation of concerns, enabling different storage backends to be used interchangeably while maintaining consistent data handling and security.
Defines the contract for storing and retrieving domain events and snapshots. It acts as the primary interface for the Repository Pattern, abstracting the underlying persistence mechanism. This component is crucial for enabling pluggable persistence adapters.
Related Classes/Methods:
Handles the serialization, compression, and encryption/decryption of domain events and snapshots to and from their storable format. Ensures data integrity and security before persistence. It's a key component for data transformation and security.
Related Classes/Methods:
Provides the cryptographic services (encryption/decryption) required by the Mapper to secure sensitive event data. This component ensures the confidentiality of stored events.
Related Classes/Methods:
An in-memory, Plain Old Python Object (POPO) based implementation of EventStore, primarily used for development, testing, or lightweight applications where disk persistence is not required. It provides a simple, non-persistent storage solution.
Related Classes/Methods:
A concrete implementation of EventStore specifically for PostgreSQL databases, managing database-specific operations and optimizations. This component enables robust, persistent storage using PostgreSQL.
Related Classes/Methods:
A concrete implementation of EventStore for SQLite databases, handling file-based or in-memory SQLite connections. This component offers a lightweight, file-based persistent storage option.
Related Classes/Methods: