Skip to content

Remove consistent read model support from framework#40

Merged
vanrogu merged 1 commit intodevelopfrom
claude/evaluate-readmodel-removal-QVlXM
Feb 22, 2026
Merged

Remove consistent read model support from framework#40
vanrogu merged 1 commit intodevelopfrom
claude/evaluate-readmodel-removal-QVlXM

Conversation

@vanrogu
Copy link
Member

@vanrogu vanrogu commented Feb 22, 2026

Summary

This change removes support for consistent (synchronously updated) read models from the event modeling framework. The framework now only supports live read models (rendered on-demand) and eventually consistent read models (asynchronously updated).

Key Changes

  • Removed consistent read model infrastructure:

    • Deleted ConsistentEventProcessor interface
    • Removed Consistency enum from BoundedContextBuilderImpl
    • Removed consistent() method from LiveModelSpecification and LongLivedReadModelSpecification interfaces
    • Removed consistency tracking fields and methods from specification implementations
  • Simplified read model module:

    • Removed consistentReadModels collection from ReadModelModule
    • Removed updateSharedConsistentModels() method that handled synchronous updates
    • Removed event stream subscription in BoundedContextImpl that dispatched to consistent models
  • Updated filtering logic:

    • Removed consistency checks when filtering read models by type
    • Long-lived read models are now filtered only by shared/local/ephemeral status, not by consistency level
  • Test updates:

    • Removed all consistent read model test instances and assertions from EventDispatchingToReadModelsTest
    • Updated test methods to only use eventually consistent and live models
    • Removed consistentModels() and noConsistentModels() helper methods

Implementation Details

The removal simplifies the read model architecture by eliminating the synchronous update path. All long-lived read models now follow the eventually consistent pattern, updated asynchronously through event processors. This reduces complexity while maintaining support for both live (on-demand) and eventually consistent (asynchronously updated) read model patterns.

https://claude.ai/code/session_01BS1GKM5XqW4kQyauxndPoZ

Consistent (synchronous) readmodel updates added complexity without
sufficient benefit. All long-lived readmodels now use eventually
consistent processing via the existing async ProjectorProcessor
infrastructure.

Removed:
- ConsistentEventProcessor interface
- CONSISTENT enum value from Consistency
- consistent() method from LiveModelSpecification and
  LongLivedReadModelSpecification interfaces
- Synchronous event subscription in BoundedContextImpl
- updateSharedConsistentModels method from ReadModelModule
- consistentReadModels collection and constructor parameter
- All consistent model test fixtures from EventDispatchingToReadModelsTest

https://claude.ai/code/session_01BS1GKM5XqW4kQyauxndPoZ
@vanrogu vanrogu merged commit 3659769 into develop Feb 22, 2026
1 check passed
@vanrogu vanrogu deleted the claude/evaluate-readmodel-removal-QVlXM branch February 23, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants