EventFlow

Async/await first CQRS+ES and DDD framework for .NET

OTHER License

Stars
2.3K
Committers
77

Bot releases are hidden (Show)

EventFlow - v0.30.2019

Published by rasmus over 8 years ago

  • Breaking: To simplify the EventFlow NuGet package structure, the two NuGet
    packages EventFlow.EventStores.MsSql and EventFlow.ReadStores.MsSql have
    been discontinued and their functionality move to the existing package
    EventFlow.MsSql. The embedded SQL scripts have been made idempotent making
    the upgrade a simple operation of merely using the new name spaces. To make
    the upgrade easier, the deprecated NuGet packages will still be uploaded,
    but will not contain anything
  • Fixed: When configuring Elasticsearch and using the overload of
    ConfigureElasticsearch that takes multiple of URLs, SniffingConnectionPool
    is now used instead of StaticConnectionPool and with sniff life span of five
    minutes
EventFlow - v0.29.1973

Published by rasmus over 8 years ago

  • Breaking: IAggregateRoot has some breaking changes. If these methods aren't
    used (which is considered the typical case), then the base class
    AggregateRoot<,,> will automatically handle it
    • CommitAsync has an additional ISnapshotStore parameter. If you don't
      use snapshot aggregates, then you can safely pass null
    • LoadAsync is a new method that lets the aggregate control how its
      loaded fromt the event- and snapshot stores
  • New core feature: EventFlow now support snapshot creation for aggregate
    roots. The EventFlow documentation has been updated to include a guide on
    how to get started using snapshots. Snapshots are basically an opt-in optimized
    method for handling long-lived aggregate roots. Snapshot support in EventFlow
    introduces several new elements, read the documentation to get an overview.
    Currently EventFlow offers the following snapshot stores
    • In-memory
    • Microsoft SQL Server
  • New: The IAggregateStore is introduced, which provides a cleaner interface
    for manipulating aggregate roots. The most important method is the
    UpdateAsync which allows easy updates to aggregate roots without the need
    for a command and command handler
    • LoadAsync
    • UpdateAsync
    • StoreAsync
  • New: IEventStore now supports loading events from a specific version using
    the new overload of LoadEventsAsync that takes a fromEventSequenceNumber
    argument
  • New: IMsSqlDatabaseMigrator now has a overloaded method named
    MigrateDatabaseUsingScripts that takes an IEnumerable<SqlScript>
    enabling specific scripts to be used in a database migration
  • New: Added suport to use EventStore persistence with connection strings
    instead IPs only
  • Obsolete: The following aggregate related methods on IEventStore has been
    marked as obsolete in favor of the new IAggregateStore. The methods will be
    removed at some point in the future
    • LoadAggregateAsync
    • LoadAggregate
EventFlow - v0.28.1852

Published by rasmus over 8 years ago

  • Critical fix: OptimisticConcurrencyRetryStrategy now correctly only
    states that OptimisticConcurrencyException should be retried. Before
    ALL exceptions from the event stores were retried, not only the transient!
    If you have inadvertently become dependent on this bug, then implement your
    own IOptimisticConcurrencyRetryStrategy that has the old behavior
  • Fixed: OptimisticConcurrencyRetryStrategy has a off-by-one error that caused
    it to retry one less that it actually should
  • Fixed: Prevent abstract ICommandHandler<,,,> from being registered in
    EventFlowOptionsCommandHandlerExtensions.AddCommandHandlers(...)
  • Fixed: Prevent abstract IEventUpgrader<,> from being registered in
    EventFlowOptionsEventUpgradersExtensions.AddEventUpgraders(...)
  • Fixed: Prevent abstract IMetadataProvider from being registered in
    EventFlowOptionsMetadataProvidersExtensions.AddMetadataProviders(...)
  • Fixed: Prevent abstract IQueryHandler<,> from being registered in
    EventFlowOptionsQueriesExtensions.AddQueryHandlers(...)
  • Fixed: Prevent abstract ISubscribeSynchronousTo<,,> from being registered in
    EventFlowOptionsSubscriberExtensions.AddSubscribers(...)
EventFlow - v0.27.1765

Published by rasmus over 8 years ago

  • New: Configure Hangfire job display names by implementing
    IJobDisplayNameBuilder. The default implementation uses job description
    name and version
EventFlow - v0.26.1714

Published by rasmus over 8 years ago

  • Breaking: Renamed MssqlMigrationException to SqlMigrationException
  • Breaking: Renamed SqlErrorRetryStrategy to MsSqlErrorRetryStrategy
    as its MSSQL specific
  • Breaking: The NuGet package Dapper is no longer IL merged with the package
    EventFlow.MsSql but is now listed as a NuGet dependency. The current
    version used by EventFlow is v1.42
  • New: Introduced the NuGet package EventFlow.SQLite that adds event store
    support for SQLite databases, both as event store and read model store
  • New: Introduced the NuGet package EventFlow.Sql as shared package for
    EventFlow packages that uses SQL
  • New: Its now possible to configure the retry delay for MSSQL transient
    errors using the new IMsSqlConfiguration.SetTransientRetryDelay. The
    default is a random delay between 50 and 100 milliseconds
EventFlow - v0.25.1695

Published by rasmus over 8 years ago

  • Fixed: Deadlock in AsyncHelper if e.g. an exception caused no async tasks
    to be scheduled. The AsyncHelper is used by EventFlow to expose non-async
    methods to developers and provide the means to call async methods from
    a synchronous context without causing a deadlock. There's no change to any of
    the async methods.

    The AsyncHelper is used in the following methods.

    • ICommandBus.Publish
    • IEventStore.LoadEvents
    • IEventStore.LoadAggregate
    • IEventStore.LoadAllEvents
    • IJobRunner.Execute
    • IReadModelPopulator.Populate
    • IReadModelPopulator.Purge
    • IQueryProcessor.Process
EventFlow - v0.24.1563

Published by rasmus over 8 years ago

  • Breaking: The following NuGet references have been updated
    • EventStore.Client v3.4.0 (up from v3.0.2)
    • Hangfire.Core v1.5.3 (up from v1.4.6)
    • RabbitMQ.Client v3.6.0 (up from v3.5.4)
  • New: EventFlow now uses Paket to manage NuGet packages
  • Fixed: Incorrect use of EventStore.Client that caused it to throw
    WrongExpectedVersionException when committing aggregates multiple times
  • Fixed: Updated NuGet package titles of the following NuGet packages to
    contain assembly name to get a better overview when searching on
    nuget.org
    • EventFlow.RabbitMQ
    • EventFlow.EventStores.EventStore
  • Fixed: Updated internal NuGet reference dbup to v3.3.0 (up from v3.2.1)
EventFlow - v0.23.1470

Published by rasmus almost 9 years ago

  • Breaking: EventFlow no longer ignores columns named Id in MSSQL read models.
    If you were dependent on this, use the MsSqlReadModelIgnoreColumn attribute
  • Fixed: Instead of using MethodInfo.Invoke to call methods on reflected
    types, e.g. when a command is published, EventFlow now compiles an expression
    tree instead. This has a slight initial overhead, but provides a significant
    performance improvement for subsequent calls
  • Fixed: Read model stores are only invoked if there's any read model updates
  • Fixed: EventFlow now correctly throws an ArgumentException if EventFlow has
    been incorrectly configure with known versioned types, e.g. an event
    is emitted that hasn't been added during EventFlow initialization. EventFlow
    would handle the save operation correctly, but if EventFlow was reinitialized
    and the event was loaded before it being emitted again, an exception would
    be thrown as EventFlow would know which type to use. Please make sure to
    correctly load all event, command and job types before use
  • Fixed: IReadModelFactory<>.CreateAsync(...) is now correctly used in
    read store mangers
  • Fixed: Versioned type naming convention now allows numbers
EventFlow - v0.22.1393

Published by rasmus almost 9 years ago

  • New: To customize how a specific read model is initially created, implement
    a specific IReadModelFactory<> that can bootstrap that read model
  • New: How EventFlow handles MSSQL read models has been refactored to allow
    significantly more freedom to developers. MSSQL read models are no longer
    required to implement IMssqlReadModel, only the empty IReadModel
    interface. Effectively, this means that no specific columns are required,
    meaning that the following columns are no longer enforced on MSSQL read
    models. Use the new required MsSqlReadModelIdentityColumn attribute to mark
    the identity column and the optional (but recommended)
    MsSqlReadModelVersionColumn to mark the version column.
    • string AggregateId
    • DateTimeOffset CreateTime
    • DateTimeOffset UpdatedTime
    • int LastAggregateSequenceNumber
  • Obsolete: IMssqlReadModel and MssqlReadModel. Developers should instead
    use the MsSqlReadModelIdentityColumn and MsSqlReadModelVersionColumn
    attributes to mark the identity and version columns (read above).
    EventFlow will continue to support IMssqlReadModel, but it will be
    removed at some point in the future
  • Fixed: Added missing UseElasticsearchReadModel<TReadModel, TReadModelLocator>()
    extension
EventFlow - v0.21.1312

Published by rasmus almost 9 years ago

  • New: Added Identity<>.NewComb() that creates sequential unique IDs which can
    be used to minimize database fragmentation
  • New: Added IReadModelContext.Resolver to allow read models to fetch
    additional resources when events are applied
  • New: The PrettyPrint() type extension method, mostly used for verbose
    logging, now prints even prettier type names, e.g.
    KeyValuePair<Boolean,Int64> instead of merely KeyValuePair'2, making log
    messages slightly more readable
EventFlow - v0.20.1274

Published by rasmus almost 9 years ago

  • Breaking: Entity<T> now inherits from ValueObject but uses only the Id
    field as equality component. Override GetEqualityComponents() if you have
    a different notion of equality for a specific entity
  • Breaking: Entity<T> will now throw an ArgumentNullException if the id
    passed to its constructor is null
  • Breaking: Fixed method spelling. Renamed
    ISpecification<T>.WhyIsNotStatisfiedBy to WhyIsNotSatisfiedBy and
    Specification<T>.IsNotStatisfiedBecause to IsNotSatisfiedBecause
  • New: Read model support for Elasticsearch via the new NuGet package
    EventFlow.ReadStores.Elasticsearch
EventFlow - v0.19.1225

Published by rasmus almost 9 years ago

  • Breaking: AddDefaults now also adds the job type definition to the
    IJobsDefinitonService
  • New: Implemented a basic specification pattern by providing
    ISpecification<T>, an easy-to-use Specificaion<T> and a set of extension
    methods. Look at the EventFlow specification tests to get started
  • Fixed: IEventDefinitionService, ICommandDefinitonService and
    IJobsDefinitonService now longer throw an exception if an existing
    event is loaded, i.e., multiple calls to AddEvents(...), AddCommand(...)
    and AddJobs(...) no longer throws an exception
  • Fixed: DomainError.With(...) no longer executes string.format if only
    one argument is parsed
EventFlow - v0.18.1181

Published by rasmus about 9 years ago

  • POTENTIAL DATA LOSS for the files event store: The EventFlow
    internal functionality regarding event stores has been refactored resulting
    in information regarding aggregate names being removed from the event
    persistence layer. The files based event store no longer stores its events in
    the path [STORE PATH]\[AGGREGATE NAME]\[AGGREGATE ID]\[SEQUENCE].json, but
    in the path [STORE PATH]\[AGGREGATE ID]\[SEQUENCE].json. Thus if you are
    using the files event store for tests, you should move the events into the
    new file structure. Alternatively, implement the new IFilesEventLocator and
    provide your own custom event file layout.
  • Breaking: Event stores have been split into two parts, the IEventStore
    and the new IEventPersistence. IEventStore has the same interface before
    but the implementation is now no longer responsible for persisting the events,
    only converting and serializing the persisted events. IEventPersistence
    handles the actual storing of events and thus if any custom event stores have
    been implemented, they should implement to the new IEventPersistence
    instead.
  • New: Added IEntity, IEntity<> and an optional Entity<> that developers
    can use to implement DDD entities.
EventFlow - v0.17.1134

Published by rasmus about 9 years ago

  • Fixed: Using NuGet package EventFlow.Autofac causes an exception with the
    message The type 'EventFlow.Configuration.Registrations.AutofacStartable' is not assignable to service 'Autofac.IStartable during EventFlow setup
EventFlow - v0.16.1120

Published by rasmus about 9 years ago

  • Breaking: Removed HasRegistrationFor<> and GetRegisteredServices()
    from IServiceRegistration and added them to IResolver instead. The
    methods required that all service registrations went through EventFlow,
    which in most cases they will not
  • Obsolete: Marked IServiceRegistration.RegisterIfNotRegistered(...), use
    the keepDefault = true on the other Register(...) methods instead
  • New: Major changes have been done to how EventFlow handles service
    registration and bootstrapping in order for developers to skip calling
    CreateResolver() (or CreateContainer() if using the EventFlow.Autofac
    package) completely. EventFlow will register its bootstrap services in the
    IoC container and configure itself whenever the container is created
  • New: Introduced IBootstrap interface that you can register. It has a
    single BootAsync(...) method that will be called as soon as the IoC
    container is ready (similar to that of IStartable of Autofac)
  • Fixed: Correct order of service registration decorators. They are now
    applied in the same order they are applied, e.g., the last registered
    service decorator will be the "outer" service
  • Fixed: Added missing ICommand<,> interface to abstract Command<,> class in
    EventFlow.Commands.
EventFlow - v0.15.1057

Published by rasmus about 9 years ago

  • Fixed: Added UseHangfireJobScheduler() and marked UseHandfireJobScheduler()
    obsolete, fixing method spelling mistake
EventFlow - v0.14.1051

Published by rasmus about 9 years ago

  • Breaking: All EventFlowOptions extensions are now IEventFlowOptions
    instead and EventFlowOptions implements this interface. If you have made
    your own extensions, you will need to use the newly created interface
    instead. Changed in order to make testing of extensions and classes
    dependent on the EventFlow options easier to test
  • New: You can now bundle your configuration of EventFlow into modules that
    implement IModule and register these by calling
    EventFlowOptions.RegisterModule(...)
  • New: EventFlow now supports scheduled job execution via e.g. Hangfire. You
    can create your own scheduler or install the new EventFlow.Hangfire NuGet
    package. Read the jobs documentation for more details
  • New: Created the OWIN CommandPublishMiddleware middleware that can
    handle publishing of commands by posting a JSON serialized command to
    e.g. /commands/ping/1 in which ping is the command name and 1 its
    version. Remember to add authentication
  • New: Created a new interface ICommand<TAggregate,TIdentity,TSourceIdentity>
    to allow developers to control the type of ICommand.SourceId. Using the
    ICommand<TAggregate,TIdentity> (or Command<TAggregate,TIdentity>)
    will still yield the same result as before, i.e., ICommand.SourceId being
    of type ISourceId
  • New: The AddDefaults(...) now also adds the command type definition to the
    new ICommandDefinitonService
EventFlow - v0.13.962

Published by rasmus about 9 years ago

  • Breaking: EventFlowOptions.AddDefaults(...) now also adds query handlers
  • New: Added an optional Predicate<Type> to the following option extension
    methods that scan an Assembly: AddAggregateRoots(...),
    AddCommandHandlers(...), AddDefaults(...), AddEventUpgraders(...),
    AddEvents(...), AddMetadataProviders(...), AddQueryHandlers(...) and
    AddSubscribers(...)
  • Fixed: EventFlowOptions.AddAggregateRoots(...) now prevents abstract
    classes from being registered when passing IEnumerable<Type>
  • Fixed: Events published to RabbitMQ are now in the right order for chains
    of subscribers, if event A -> subscriber -> command -> aggregate -> event B,
    then the order of published events to RabbitMQ was event B and then
    event A
EventFlow - v0.12.891

Published by rasmus about 9 years ago

  • Breaking: Aggregate root no longer have Aggregate removed from their
    when name, i.e., the metadata property with key aggregate_name (or
    MetadataKeys.AggregateName). If you are dependent on the previous naming,
    use the new AggregateName attribute and apply it to your aggregates
  • Breaking: Moved Identity<> and IIdentity from the EventFlow.Aggregates
    namespace to EventFlow.Core as the identities are not specific for aggregates
  • Breaking: ICommand.Id is renamed to ICommand.AggregateId to make "room"
    for the new ICommand.SourceId property. If commands are serialized, then
    it might be important verify that the serialization still works. EventFlow
    does not serialize commands, so no mitigation is provided. If the
    Command<,> is used, make sure to use the correct protected constructor
  • Breaking: IEventStore.StoreAsync(...) now requires an additional
    ISourceId argument. To create a random one, use SourceId.New, but it
    should be e.g. the command ID that resulted in the events. Note, this method
    isn't typically used by developers
  • New: Added ICommand.SourceId, which contains the ID of the source. The
    default (if your commands inherit from Command<,>) will be a new
    CommandId each time the a Command<,> instance is created. You can pass
    specific value, merely use the newly added constructor taking the ID.
    Alternatively you commands could inherit from the new
    DistinctCommand, enabling commands with the same state to have the
    same SourceId
  • New: Duplicate commands can be detected using the new ISourceId. Read the
    EventFlow article regarding commands for more details
  • New: Aggregate names can now be configured using the attribute
    AggregateName. The name can be accessed using the new IAggregateRoot.Name
    property
  • New: Added Identity<>.NewDeterministic(Guid, string) enabling creation of
    deterministic GUIDs
  • New: Added new metadata key source_id (MetadataKeys.SourceId) containing
    the source ID, typically the ID of the command from which the event
    originated
  • New: Added new metadata key event_id (MetadataKeys.EventId) containing a
    deterministic ID for the event. Events with the same aggregate sequence
    number and from aggregates with the same identity, will have the same event
    identity
  • Fixed: Identity<>.With(string) now throws an ArgumentException instead of
    a TargetInvocationException when passed an invalid identity
  • Fixed: Aggregate roots now build the cache of Apply methods once, instead
    of when the method is requested the first time
EventFlow - v0.11.751

Published by rasmus about 9 years ago

  • Breaking: EventFlowOptions.AddDefaults(...) now also adds event
    definitions
  • New: RabbitMQ is now supported through the new
    NuGet package called EventFlow.RabbitMQ which enables domain events to be
    published to the bus
  • New: If you want to subscribe to all domain events, you can implement
    and register a service that implements ISubscribeSynchronousToAll. Services
    that implement this will automatically be added using the
    AddSubscribers(...) or AddDefaults(...) extension to EventFlowOptions
  • New: Use EventFlowOptions.UseAutofacAggregateRootFactory(...) to use an
    Autofac aggregate root factory, enabling you to use services in your
    aggregate root constructor
  • New: Use EventFlowOptions.UseResolverAggregateRootFactory() to use the
    resolver to create aggregate roots. Same as
    UseAutofacAggregateRootFactory(...) but for when using the internal IoC
    container
  • New: Use EventFlowOptions.AddAggregateRoots(...) to register aggregate root
    types
  • New: Use IServiceRegistration.RegisterType(...) to register services by
    type