Replies: 1 comment
-
|
So you would like to have read model that is no persisted anywhere, meaning event projected in-memory implementation? What you could do now is to have new Aggregate for this, which does not have any state changing methods. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
In Event Sourcing / CQRS architectures, event-triggered side-effects (emails, documents, webhooks, integrations, etc.) often need access to a consistent read view that is not contained in the triggering event and may evolve over time.
Common approaches have known trade-offs:
Ecotone currently has no first-class mechanism to build a minimal read model on demand, scoped to a single aggregate, without persistence.
Proposal
Introduce On-Demand (Transient) Projections as a new, optional module.
These projections would be:
The goal is to provide a lightweight, strongly scoped alternative to persistent projections, without impacting existing projection semantics.
Example (realistic use case)
An
OrderPlacedevent triggers a confirmation email.Customer contact data is owned by another aggregate and evolves over time
(
CustomerEmailUpdated,CustomerAddressUpdated, etc.).We want the current customer state:
OrderPlacedOn-demand projection for the Customer aggregate
Used from another event handler
Note: rebuilding state at a specific point in time is optional.
The feature remains useful without version or timestamp bounding.
Non-goals / Limits
Implementation Positioning
This feature is intended to be implemented as a new, dedicated, optional module
(e.g. OnDemandProjection), rather than an extension of the existing projection system.
This keeps:
Questions
I would be happy to contribute a full implementation (code, tests, documentation) as this new module if the direction aligns with the project goals.
Beta Was this translation helpful? Give feedback.
All reactions