EventSourcing.NetCore

Examples and Tutorials of Event Sourcing in .NET

MIT License

Stars
3.2K
Committers
31

Bot releases are hidden (Show)

EventSourcing.NetCore - Extended distributed processes examples with Choreography and Process Manager Latest Release

Published by oskardudycz over 1 year ago

Extended distributed processes examples with Choreography and Process Manager in addition to the already existing Saga example.

See details in PR https://github.com/oskardudycz/EventSourcing.NetCore/pull/206.

Full sample: https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Sample/HotelManagement

Video with explanation:

EventSourcing.NetCore - Talk CQRS is simpler than you think with C#11 and .NET 7!

Published by oskardudycz over 1 year ago

Added link to talk CQRS is simpler than you think with C#11 and .NET 7!

Watch it below:

EventSourcing.NetCore - From CRUD to CQRS

Published by oskardudycz over 1 year ago

Added example showing step-by-step how to migrate from CRUD-based application into CQRS.

See more in: https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Sample/CRUDToCQRS.

EventSourcing.NetCore - Let's build event store in one hour talk and materials

Published by oskardudycz almost 2 years ago

You can watch:

and read:

Check the full self-paced kit a and do it on your ownt: https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Workshops/BuildYourOwnEventStore

EventSourcing.NetCore - Simplified the repositories usage

Published by oskardudycz almost 2 years ago

Simplified the repositories usage. Previously they were all in one, plus optimistic concurrency handling from the HTTP request ETag had too many classes. Now they were dropped and replaced with repositories decorators.

Added also repositories registration helpers that are capable of building the onion around the base repository with Optimistic Concurrency scope and Telemetry data.

What's Changed

Full Changelog: https://github.com/oskardudycz/EventSourcing.NetCore/compare/v17.0.0...v18.0.0

EventSourcing.NetCore - Added "Implementing Distributed Processes" sample

Published by oskardudycz almost 2 years ago

Added example of distributed processes management using Group Guests Checkout as an example.
It was modelled and explained in detail in the Implementing Distributed Processes Webinar:

It shows how to:

  • orchestrate and coordinate business workflow spanning across multiple aggregates using Saga pattern,
  • handle distributed processing both for asynchronous commands scheduling and events publishing,
  • getting at-least-once delivery guarantee,
  • implementing command store and outbox pattern on top of Marten and EventStoreDB,
  • unit testing aggregates and Saga with a little help from Ogooreck,
  • testing asynchronous code,

Read more in:

See more in PR: https://github.com/oskardudycz/EventSourcing.NetCore/pull/167.

EventSourcing.NetCore - Brought back test reporter

Published by oskardudycz almost 2 years ago

EventSourcing.NetCore - Configured static analysis and applied ConfigureAwait(false) to Core classes

Published by oskardudycz almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/oskardudycz/EventSourcing.NetCore/compare/v16.1.0...v16.2.0

EventSourcing.NetCore - Replaced Event Bus with Event Store in projection tests to make them more explicit and self-explanator

Published by oskardudycz almost 2 years ago

What's Changed

Full Changelog: https://github.com/oskardudycz/EventSourcing.NetCore/compare/v16.0.0...v16.1.0

EventSourcing.NetCore - Open Telemetry applied

Published by oskardudycz almost 2 years ago

Introduced Open Telemetry tracing together with context propagation:

  • CQRS processing,
  • Marten,
  • EventStoreDB,
  • Kafka.

Removed MediatR as:

  • I'd like to have more customisation around Open Telemetry instrumentation,
  • Retries,
  • I haven't used either pipelines or behaviours,
  • it was more limiting than helping (especially with its enforcement of marker interfaces).

Removed previous manual instrumentation around correlation and causation ids.

TODO:

See details in https://github.com/oskardudycz/EventSourcing.NetCore/pull/181.

EventSourcing.NetCore - Updated to .NET 7 and bumped all dependencies

Published by oskardudycz almost 2 years ago

EventSourcing.NetCore - Pragmatic Event Sourcing with Marten using Helpdesk domain

Published by oskardudycz over 2 years ago

  • Simplest CQRS and Event Sourcing flow using Minimal API,
  • Cutting the number of layers and boilerplate complex code to the bare minimum,
  • Using all Marten helpers like WriteToAggregate and AggregateStream to simplify the processing,
  • Examples of all the typical Marten's projections,
  • Example of how and where to use C# Records, Nullable Reference Types, etc,
  • No Aggregates. Commands are handled in the domain service as pure functions.

See more in https://github.com/oskardudycz/EventSourcing.NetCore/pull/161.

EventSourcing.NetCore - Used Ogooreck as API testing framework

Published by oskardudycz over 2 years ago

  1. Migrated all API tests to Ogooreck.
  2. Removed all startup classes and used a single Program file and WebApplicationFactory for tests.
  3. Aligned tests, and removed obsolete helpers.
  4. Fixed issue with doubled registration of event handlers because of open-generic EventListener registration (replaced with IEventBus decorator).

Read more about Ogooreck in my blog post: Ogooreck, a sneaky testing library in BDD style.

See details in PR: https://github.com/oskardudycz/EventSourcing.NetCore/pull/136.

EventSourcing.NetCore - Updated Marten to 5.5.0

Published by oskardudycz over 2 years ago

  1. Aligned also Marten projections naming to latest convention:
  • AggregateProjection to SingleStreamAggregation,
  • ViewProjection to MultiStreamAggregation
  1. Used convention-based version assignment on stream aggregation and single-stream projections.
EventSourcing.NetCore - Fixed Kafka integration

Published by oskardudycz over 2 years ago

Fixed Kafka integration

  • added the initialiser to docker-compose to set the Kafka topics upfront.
  • fixed EventEnvelope creation to use a generic one. Changed the non-generic from record to interface to make sure that it won't be used.
  • made sure that EventBus takes only EventEnvelope.
  • created EventEnvelope in the external publishing.
  • used handler in KafkaConsumer to deserialise contracts with private constructors,
  • changed KafkaConsumer setting to commit offset manually.
  • enforced EventEnvelope on in-memory bus.
  • added EventEnvelopeExtensions for Kafka message deserialisation and aligned with EventStoreDB subscription to all to ignore messages that are not able to deserialise

See more in PR: https://github.com/oskardudycz/EventSourcing.NetCore/pull/150

EventSourcing.NetCore - Used Minimal APIs builders instead of custom one in Warehouse CQRS sample

Published by oskardudycz over 2 years ago

Do you know that you can use .NET MinimalAPI methods not only in Program.cs?
Yes, you can! It lets you slice your architecture and put endpoints definitions separately, near the respectful business logic. This matches great with CQRS.

See more in the PR: https://github.com/oskardudycz/EventSourcing.NetCore/pull/144

EventSourcing.NetCore - Added CQRS with Minimal API sample

Published by oskardudycz over 2 years ago

  • CQRS flow using Minimal API,
  • example how to inject handlers in MediatR'like style to decouple API from handling,
  • example of how and where to use C# Records, Nullable Reference Types, etc,
  • No Event Sourcing! Using Entity Framework to show that CQRS is not bounded to Event Sourcing or any type of storage,
  • No Aggregates! CQRS does not need DDD. Business logic can be handled by handlers.
  • 📝 Read more CQRS is simpler than you think with .NET 6 and C# 10

See more in

EventSourcing.NetCore - Refactored and added solutions projections exercises and added new video recording

Published by oskardudycz over 2 years ago

Refactored and added solutions projections exercises

Refactored projections tests to focus on single-stream projections first, then expand on multi-stream projections. Mixing them in the same exercise brings too many concepts immediately. I decided to refactor the current one to show details and list projections for the single stream and include multi-stream projections as the follow-up exercises. They will come in one of the following pull requests.

See the new version of the exercises:

Related Pull Requests: #139 , #140

Added link to "CQRS is simpler than you think with C#9 and NET 5!" webinar

Watch it 👇

EventSourcing.NetCore - Added "How to deal with privacy and GDPR in Event-Sourced systems" talk

Published by oskardudycz over 2 years ago

Added link to "How to deal with privacy and GDPR in Event-Sourced systems" talk.
Watch it 👇

Upgraded also packages to the most recent versions.

EventSourcing.NetCore - Added "Let's build the worst Event Sourcing system!" talk

Published by oskardudycz over 2 years ago

Added link to "Let's build the worst Event Sourcing system!" talk I gave at EventSourcing Live 2021 conference.
Watch it 👇