You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- the real-world handling in the banking domain (it's oversimplified),
- it's lacking the proper description, so some of the assumptions used (like not using repositories, etc. to show the simplest flow) may be misleading and target to wrong direction,
- showing that you can if you want store more than one aggregate is okay if it's explained. Without explanation it may be wrongly interpreted that's the right approach.
- there is already other, better ECommerce sample that's showing how to integrate EventSourcing with traditional approach.
-[11. NuGet packages to help you get started.](#11-nuget-packages-to-help-you-get-started)
25
25
-[12. Other resources](#12-other-resources)
26
26
-[12.1 Introduction](#121-introduction)
@@ -379,13 +379,84 @@ You can also watch my presentation "Practical Event Sourcing with Marten":
379
379
380
380
<ahref="https://www.youtube.com/watch?v=L_ized5xwww&list=PLw-VZz_H4iio9b_NrH25gPKjr2MAS2YgC&index=7"target="_blank"><imgsrc="https://img.youtube.com/vi/L_ized5xwww/0.jpg"alt="Practical Event Sourcing with Marten (EN)"width="320"height="240"border="10" /></a>
381
381
382
-
## 4. Libraries used
382
+
and discussion with [Yves Lorphelin](https://github.com/ylorph/) about CQRS:
383
+
384
+
<ahref="https://www.youtube.com/watch?v=D-3N2vQ7ADE"target="_blank"><imgsrc="https://img.youtube.com/vi/D-3N2vQ7ADE/0.jpg"alt="Event Store Conversations: Yves Lorphelin talks to Oskar Dudycz about CQRS (EN)"width="320"height="240"border="10" /></a>
385
+
386
+
## 4. Tools used
387
+
388
+
1.[Marten](https://martendb.io/) - Event Store and Read Models
389
+
2.[EventStoreDB](https://eventstore.com) - Event Store
See also fully working samples of Event Sourcing and CQRS applications in [Samples folder](https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Sample).
397
+
398
+
-**[ECommerce with Marten](./Sample/ECommerce)**
399
+
- typical Event Sourcing and CQRS flow,
400
+
- DDD using Aggregates,
401
+
- microservices example,
402
+
- stores events to Marten,
403
+
- distributed processes coordinated by Saga ([Order Saga](./Sample/ECommerce/Orders/Orders/Orders/OrderSaga.cs)),
404
+
- Kafka as a messaging platform to integrate microservices,
405
+
- example of the case when some services are event-sourced ([Carts](./Sample/ECommerce/Carts), [Orders](./Sample/ECommerce/Orders), [Payments](./Sample/ECommerce/Payments)) and some are not ([Shipments](./Sample/ECommerce/Shipments) using EntityFramework as ORM)
406
+
407
+
-**[ECommerce with EventStoreDB](./Sample/EventStoreDB/ECommerce)**
408
+
- typical Event Sourcing and CQRS flow,
409
+
- DDD using Aggregates,
410
+
- stores events to EventStoreDB,
411
+
- Builds read models using [Subscription to `$all`](https://developers.eventstore.com/clients/grpc/subscribing-to-streams/#subscribing-to-all).
412
+
- Read models are stored as Marten documents.
413
+
414
+
-**[Warehouse](./Sample/AsyncProjections/)**
415
+
- simplest CQRS flow using .NET 5 Endpoints,
416
+
- example of how and where to use C# Records, Nullable Reference Types, etc,
417
+
- No Event Sourcing! Using Entity Framework to show that CQRS is not bounded to Event Sourcing or any type of storage,
418
+
- No Aggregates! CQRS do not need DDD. Business logic can be handled in handlers.
419
+
420
+
-**[Meetings Management with Marten](./Sample/MeetingsManagement/)**
421
+
- typical Event Sourcing and CQRS flow,
422
+
- DDD using Aggregates,
423
+
- microservices example,
424
+
- stores events to Marten,
425
+
- Kafka as a messaging platform to integrate microservices,
426
+
- read models handled in separate microservice and stored to other database (ElasticSearch)
427
+
428
+
-**[Cinema Tickets Reservations with Marten](./Sample/Tickets/)**
429
+
- typical Event Sourcing and CQRS flow,
430
+
- DDD using Aggregates,
431
+
- stores events to Marten.
432
+
433
+
-**[SmartHome IoT with Marten](./Sample/AsyncProjections/)**
434
+
- typical Event Sourcing and CQRS flow,
435
+
- DDD using Aggregates,
436
+
- stores events to Marten,
437
+
- asynchronous projections rebuild using AsynDaemon feature.
438
+
439
+
## 6. Self-paced training Kit
383
440
384
-
1.[Marten](https://github.com/JasperFx/marten) - Event Store
441
+
I prepared the self-paced training Kit for the Event Sourcing. See more in the [Workshop description](./Workshops/BuildYourOwnEventStore/Readme.md).
442
+
443
+
It's split into two parts:
444
+
445
+
**Event Sourcing basics** - it teaches the event store basics by showing how to build your Event Store on Relational Database. It starts with the tables setup, goes through appending events, aggregations, projections, snapshots, and finishes with the `Marten` basics. See more in [here](./Workshops/BuildYourOwnEventStore/).
385
446
386
-
2.[MediatR](https://github.com/jbogard/MediatR) - Message Bus (for processing Commands, Queries, Events)
11.[Projections With Marten](./Workshops/BuildYourOwnEventStore/10-ProjectionsWithMarten)
387
458
388
-
## 5. Articles
459
+
## 7. Articles
389
460
Read also more on the **Event Sourcing** and **CQRS** topics in my [blog](https://event-driven.io/?utm_source=event_sourcing_net) posts:
390
461
- 📝 [What's the difference between a command and an event?](https://event-driven.io/en/whats_the_difference_between_event_and_command/?utm_source=event_sourcing_net)
391
462
- 📝 [Events should be as small as possible, right?](https://event-driven.io/en/events_should_be_as_small_as_possible/?utm_source=event_sourcing_net)
@@ -409,7 +480,7 @@ Slides:
409
480
- 👨🏼🏫 **Ligths and Shades of Event-Driven Design** - [EN](./Slides/Lights_And_Shades_Of_Event-Driven_Design.pptx), [PL](./Slides/SegFault-Blaski_i_Cienie.pptx)
410
481
- 👨🏼🏫 **Adventures in Event Sourcing and CQRS** - [PL](./Slides/Slides.pptx)
-**Event Stream** - is a representation of the entity in event sourcing. It's a set of events that happened for the entity with the exact id. Stream id should be unique, can have different types but usually is a Guid.
-**[Initialization](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/MediatR.Tests/Initialization/Initialization.cs)** - MediatR uses services locator pattern to find a proper handler for the message type.
-**[MoreThanOneHandler](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/MediatR.Tests/Publishing/MoreThanOneHandler.cs)** - when there is more than one handler registered MediatR takes all of them when calling Publish method
-See [sample](https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Sample/EventSourcing.Sample.IntegrationTests/Clients/CreateClientTests.cs) how Entity Framework and Marten can coexist together with CQRS and Event Sourcing
**EventSourcingadvancedtopics**-it's a real-world sample of the microservices written in Event-Driven design. It explains the topics of modularity, eventual consistency. Shows practical usage of WebApi, Marten as Event Store, Kafka as Event bus and ElasticSearch as one of the read stores. See more in [here](./Workshops/BuildYourOwnEventStore/02-EventSourcingAdvanced/).
0 commit comments