eventador library
Eventador - Persistence & Event Sourcing Extension for Dactor
Industrial-grade event sourcing platform with hybrid architecture combining:
- Dactor: High-performance actor model, supervision, and messaging
- Isar: Direct permanent event storage for immutable event logs
- DuraQ: Operational workflows for sagas, projections, and command processing
Classes
- AggregateCommand
- Base class for aggregate-specific commands
-
AggregateCommandHandler<
TState extends State> - Specialized command handler for aggregate commands
- AggregateEventBase
- Base class for aggregate-specific events
-
AggregateEventHandler<
TState extends State> - Specialized event handler for aggregate events
- AggregateInfo
- Information about an aggregate root for debugging and monitoring
- AggregateRegistry
- Registry for aggregate types and their factory functions
-
AggregateRoot<
TState extends State> - Base class for aggregate roots in domain-driven design Combines PersistentActor with domain logic and command processing
- Awesome
- Checks if you are awesome. Spoiler: you are.
- CallbackSnapshotManager
- Enhanced snapshot manager with callback support
- CborSerializer
- Utility class for CBOR serialization and deserialization
- Command
- Base class for all commands in the event sourcing system Commands represent requests to change state and are processed by persistent actors Extends LocalMessage to ensure compatibility with Dactor's ask() method
-
CommandHandler<
TState extends State> - Base class for command handlers that process commands and generate events Command handlers contain the business logic for processing commands
-
CommandHandlerRegistry<
TState extends State> - Registry for command handlers
- CommandRegistry
- Registry for command types and their deserialization functions
-
CommandResult<
TState extends State> - Result of command processing
-
CompositeEventHandler<
TState extends State> - Composite event handler that delegates to multiple handlers
- Event
- Base class for all events in the event sourcing system Events represent immutable facts that have occurred and are stored permanently
-
EventApplicationPipeline<
TState extends State> - Event application pipeline for processing multiple events
- EventEnvelope
- Isar collection for storing events This wraps the actual event data with metadata needed for storage and retrieval
-
EventHandler<
TState extends State> - Base class for event handlers that apply events to update state Event handlers contain the logic for applying events to state
-
EventHandlerRegistry<
TState extends State> - Registry for event handlers
- EventMigrationManager
- Event migration manager for handling schema evolution
-
EventPipelineResult<
TState extends State> - Result of applying multiple events through a pipeline
- EventRegistry
- Registry for event types and their deserialization functions
-
EventResult<
TState extends State> - Result of event application
- EventStore
- Interface for event storage operations Defines the contract for persisting and retrieving events
- IsarEventStore
- Isar-based implementation of EventStore with EventStream support Implements Akka Persistence-style streaming queries
- PersistentActor
- Base class for persistent actors that survive system restarts Extends Dactor's Actor class with persistence capabilities
-
Projection<
TReadModel> - Base interface for event projections that build read models from events.
- ProjectionCheckpoint
- Isar collection for tracking projection checkpoints and state.
- ProjectionInfo
- Information about a projection's current state
- ProjectionManager
- Manages multiple projections using Akka Persistence-style streaming.
- ProjectionReadModel
- Isar collection for storing projection read models.
- ProjectionReadModelIndex
- Isar collection for storing projection read model indexes.
- RecoveryStatusQuery
- Query to wait for recovery to complete.
- RecoveryStatusResponse
- Response to RecoveryStatusQuery.
- Saga
- A base class for implementing Sagas, which are long-running process managers that coordinate actions between multiple actors or services.
- SagaCommandEnvelope
- A wrapper for commands sent by a saga to ensure reliable delivery to a specific target actor via DuraQ.
- SagaCoordinator
- Coordinates the operational aspects of sagas using DuraQ.
- SagaState
- A base class for representing the state of a saga.
- SagaStateEnvelope
- An Isar collection to store the persistent state of a saga.
- SagaTimeout
- A message used to signal a timeout within a saga.
- SnapshotConfig
- Configuration for snapshot creation and retention policies
- SnapshotData
- Snapshot data container
- SnapshotEnvelope
- Isar collection for storing actor state snapshots Snapshots optimize recovery by avoiding replay of all events
- SnapshotManager
- Manages automatic snapshot creation and retention policies
- SnapshotState
- State tracking for an actor's snapshot management
- SnapshotStats
- Statistics about snapshot operations
- State
- Base class for all state objects in the event sourcing system State represents the current state of an aggregate or actor
- StateChange
- Represents a change between two states
- StateRegistry
- Registry for state types and their deserialization functions
- UserLoginEvent
- UserLogoutEvent
- UserProfileUpdatedEvent
- UserRegisteredEvent
- Example user events for the projection
- UserStatistics
- Read model for user statistics
- UserStatisticsProjection
- Example projection that builds user statistics from events.
Enums
- ProjectionStatus
- Projection status
- SagaStatus
- Represents the possible statuses of a saga.
- SnapshotTrigger
- Reasons why a snapshot was triggered
- StateChangeType
- Types of state changes
Mixins
- AggregateEvent
- Mixin for events that belong to a specific aggregate
- ComparableState
- Mixin for states that can be compared for changes
- Mixin for commands that have correlation tracking
- Mixin for events that have correlation tracking
- ReplayableEvent
- Mixin for events that can be replayed
- RetryableCommand
- Mixin for commands that can be retried
- SerializableEvent
- Mixin for events that can be serialized
- SerializableState
- Mixin for states that can be serialized
- SnapshotableState
- Mixin for states that support snapshots
- TargetedCommand
- Mixin for commands that have a target aggregate
- ValidatableCommand
- Mixin for commands that can be validated
- ValidatableEvent
- Mixin for events that support validation before being applied
- ValidatableState
- Mixin for states that can be validated
- VersionedEvent
- Mixin for events that support versioning
Extensions
-
EventEnvelopeByIndex
on IsarCollection<
EventEnvelope> -
EventEnvelopeQueryFilter
on QueryBuilder<
EventEnvelope, EventEnvelope, QFilterCondition> -
EventEnvelopeQueryLinks
on QueryBuilder<
EventEnvelope, EventEnvelope, QFilterCondition> -
EventEnvelopeQueryObject
on QueryBuilder<
EventEnvelope, EventEnvelope, QFilterCondition> -
EventEnvelopeQueryProperty
on QueryBuilder<
EventEnvelope, EventEnvelope, QQueryProperty> -
EventEnvelopeQuerySortBy
on QueryBuilder<
EventEnvelope, EventEnvelope, QSortBy> -
EventEnvelopeQuerySortThenBy
on QueryBuilder<
EventEnvelope, EventEnvelope, QSortThenBy> -
EventEnvelopeQueryWhere
on QueryBuilder<
EventEnvelope, EventEnvelope, QWhereClause> -
EventEnvelopeQueryWhereDistinct
on QueryBuilder<
EventEnvelope, EventEnvelope, QDistinct> -
EventEnvelopeQueryWhereSort
on QueryBuilder<
EventEnvelope, EventEnvelope, QWhere> - GetEventEnvelopeCollection on Isar
- GetProjectionCheckpointCollection on Isar
- GetSagaStateEnvelopeCollection on Isar
- GetSnapshotEnvelopeCollection on Isar
-
ProjectionCheckpointByIndex
on IsarCollection<
ProjectionCheckpoint> -
ProjectionCheckpointQueryFilter
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QFilterCondition> -
ProjectionCheckpointQueryLinks
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QFilterCondition> -
ProjectionCheckpointQueryObject
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QFilterCondition> -
ProjectionCheckpointQueryProperty
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QQueryProperty> -
ProjectionCheckpointQuerySortBy
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QSortBy> -
ProjectionCheckpointQuerySortThenBy
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QSortThenBy> -
ProjectionCheckpointQueryWhere
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QWhereClause> -
ProjectionCheckpointQueryWhereDistinct
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QDistinct> -
ProjectionCheckpointQueryWhereSort
on QueryBuilder<
ProjectionCheckpoint, ProjectionCheckpoint, QWhere> -
SagaStateEnvelopeByIndex
on IsarCollection<
SagaStateEnvelope> -
SagaStateEnvelopeQueryFilter
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QFilterCondition> -
SagaStateEnvelopeQueryLinks
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QFilterCondition> -
SagaStateEnvelopeQueryObject
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QFilterCondition> -
SagaStateEnvelopeQueryProperty
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QQueryProperty> -
SagaStateEnvelopeQuerySortBy
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QSortBy> -
SagaStateEnvelopeQuerySortThenBy
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QSortThenBy> -
SagaStateEnvelopeQueryWhere
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QWhereClause> -
SagaStateEnvelopeQueryWhereDistinct
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QDistinct> -
SagaStateEnvelopeQueryWhereSort
on QueryBuilder<
SagaStateEnvelope, SagaStateEnvelope, QWhere> -
SnapshotEnvelopeByIndex
on IsarCollection<
SnapshotEnvelope> -
SnapshotEnvelopeQueryFilter
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QFilterCondition> -
SnapshotEnvelopeQueryLinks
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QFilterCondition> -
SnapshotEnvelopeQueryObject
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QFilterCondition> -
SnapshotEnvelopeQueryProperty
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QQueryProperty> -
SnapshotEnvelopeQuerySortBy
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QSortBy> -
SnapshotEnvelopeQuerySortThenBy
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QSortThenBy> -
SnapshotEnvelopeQueryWhere
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QWhereClause> -
SnapshotEnvelopeQueryWhereDistinct
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QDistinct> -
SnapshotEnvelopeQueryWhereSort
on QueryBuilder<
SnapshotEnvelope, SnapshotEnvelope, QWhere>
Constants
-
EventEnvelopeSchema
→ const CollectionSchema<
EventEnvelope> -
ProjectionCheckpointSchema
→ const CollectionSchema<
ProjectionCheckpoint> -
SagaStateEnvelopeSchema
→ const CollectionSchema<
SagaStateEnvelope> -
SnapshotEnvelopeSchema
→ const CollectionSchema<
SnapshotEnvelope>
Typedefs
- SnapshotCreator = Future Function(String persistenceId)
- Callback function type for snapshot creation
Exceptions / Errors
- AggregateBusinessRuleViolationException
- Exception thrown when business rules are violated
- AggregateNotInitializedException
- Exception thrown when aggregate is not initialized
- BusinessRuleViolationException
- Exception thrown when business rules are violated
- CommandDeserializationException
- Exception thrown when command deserialization fails
- CommandHandlingException
- Exception thrown when command handling fails
- CommandProcessingException
- Exception thrown when command processing fails
- CommandValidationException
- Exception thrown when command validation fails
- ConcurrencyException
- Exception thrown when optimistic concurrency control fails
- EventDeserializationException
- Exception thrown when event deserialization fails
- EventHandlingException
- Exception thrown when event handling fails
- EventMigrationException
- Exception thrown when event migration fails
- EventSerializationException
- Exception thrown when event serialization fails
- EventStoreException
- Exception thrown when event store operations fail
- EventValidationException
- Exception thrown when event validation fails
- InvalidPersistenceIdException
- Exception thrown when persistence ID is invalid
- InvariantViolationException
- Exception thrown when invariants are violated
- MetadataDeserializationException
- Exception thrown when metadata deserialization fails
- MetadataSerializationException
- Exception thrown when metadata serialization fails
- NoCommandHandlerException
- Exception thrown when no command handler is found
- NoEventHandlerException
- Exception thrown when no event handler is found
- OptimisticConcurrencyException
- Exception thrown when optimistic concurrency control fails
- ProjectionException
- Exception thrown when projection operations fail
- SnapshotException
- Exception thrown when snapshot operations fail
- StateDeserializationException
- Exception thrown when state deserialization fails
- StateRegistryDeserializationException
- Exception thrown when state registry deserialization fails
- StateSerializationException
- Exception thrown when state serialization fails
- StateValidationException
- Exception thrown when state validation fails
- StateVersionConflictException
- Exception thrown when state version conflicts occur