Skip to content

Release v15.33.0

Choose a tag to compare

@github-actions github-actions released this 04 Jun 16:22
2324b2e

Summary

Adds pagination support to read models with skip/take semantics and introduces observable instance watching backed by Arc's change stream capabilities. Materialized read model operations (pagination and observation) are separated into a dedicated IMaterializedReadModels interface exposed via the Materialized property on IReadModels, with shared Release logic for PII decryption via injectable interface pattern. Both skip and take parameters are optional with sensible defaults (skip: 0, take: 50).

Added

  • InstanceCountToSkip and InstanceCount concepts for type-safe pagination parameters with implicit conversion operators
  • IMaterializedReadModels interface with optional skip and take parameters on GetInstances<TReadModel>() and ObserveInstances<TReadModel>() methods (defaults: skip=0, take=50)
  • IMaterializedReadModels gRPC service contract with corresponding ObserveInstancesRequest and ObserveInstancesResponse types
  • IReadModels.Materialized property returning IMaterializedReadModels for accessing materialized read model operations
  • IReadModelsCompliance interface for PII decryption operations on read model instances
  • ReadModelsCompliance implementation of IReadModelsCompliance to centralize PII decryption logic
  • IEventCompliance interface for PII decryption operations on event content
  • EventCompliance implementation of IEventCompliance to centralize PII decryption logic
  • ISink.ObserveInstances(ReadModelContainerName? occurrence, int skip, int take) for sink-level observation
  • Client and Kernel implementations of MaterializedReadModels service with automatic Release() calls on all returned instances
  • Comprehensive documentation for materialized read models pagination and observation at Documentation/read-models/materialized-pagination.md
  • Specs for optional parameter behavior on GetInstances and ObserveInstances

Changed

  • Moved paginated GetInstances and observable WatchInstances methods from IReadModels to IMaterializedReadModels
  • skip and take parameters are now optional with defaults (skip: 0, take: 50) on IMaterializedReadModels interface methods
  • MongoDB Sink now supports observable instances via Arc's .Observe() with change stream monitoring
  • SQL Sink now supports observable instances via Arc's EF .Observe() with proper DbContext scope lifetime management
  • InMemorySink and NullSink updated with observation support for testing scenarios
  • Both ReadModels and MaterializedReadModels services now use injected IReadModelsCompliance for PII decryption
  • Converted ReadModelsCompliance from static helper to injectable service following the IEventCompliance pattern
  • Renamed IEventComplianceHelperIEventCompliance and EventComplianceHelperEventCompliance for consistency with read models compliance naming

Fixed

Removed

Security

Deprecated

Client layer: Converts skip/take to page-based pagination for underlying gRPC API. ObserveInstances uses polling (Observable.Interval) - consider replacing with SignalR/gRPC streaming for production workloads.

Sink layer: All implementations leverage Arc's .Observe() extensions. SQL Sink uses custom ObservableInstancesDisposable to ensure DbContext scope lives for subscription duration.

Usage:

// Paginated retrieval with explicit skip/take - implicit conversion from int
var instances = await readModels.Materialized.GetInstances<MyModel>(
    skip: 10, 
    take: 20);

// Using defaults (skip: 0, take: 50)
var instances = await readModels.Materialized.GetInstances<MyModel>();

// Observable watch with explicit skip/take
var subscription = readModels.Materialized.ObserveInstances<MyModel>(
    skip: 0, 
    take: 50)
    .Subscribe(instances => { /* handle changes */ });

// Observable watch with defaults
var subscription = readModels.Materialized.ObserveInstances<MyModel>()
    .Subscribe(instances => { /* handle changes */ });