1

I building an Application using the Event Sourcing model, and there is some entities that I do not see any benefits from memorizing their history in event streams, such as the users entity. Is it good to have parts of my system event sourced, while others modeled conventionally using the Entity-Relationship Model.

Latter If I decided to event source nonevent sourced entities, is there a general scheme I can follow, so the transformation is seamless and without data loss.

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
adnanmuttaleb
  • 3,388
  • 1
  • 29
  • 46
  • 1
    This is not something frequently done, but it is doable and IMO not a bad idea, If you ventured this on the DDD-CQRS-ES slack, I'm not sure I'd know what folks would say, so please go do that! The big question is, will the performance be good? will it be a huge pain to work with? (And an example impl: https://github.com/jet/equinox/pull/151) – Ruben Bartelink Sep 17 '19 at 00:56
  • 1
    Event Sourcing is the persistence pattern if looked at it from the application perspective. Each aggregate type can potentially have it's own persistence mechanism. If the system is modelled properly with several bounded contexts, each context can quite easily use whatever persistence it wants. – Alexey Zimarev Jun 10 '20 at 17:02
  • @AlexeyZimarev thanks for your comment, but unfortunately many of the DDD frameworks assumes you are using ES, so for each type of persistency pattern you have to use different tool chain for domain modeling. So you can not achieve true transparency in term of persistency. – adnanmuttaleb Jun 11 '20 at 07:23
  • 1
    That's why I'd avoid using "DDD frameworks". DDD tactical patterns can be represented in a very small set of abstractions. If you are in the .NET space (and even if you aren't), I could point you to my book "hands-on DDD with .net core". In fact, it has little to do with .NET Core, it's juts examples in C#. I have an app journey from using DDD patterns with more "traditional" persistence and moving to Event Sourcing. – Alexey Zimarev Jun 11 '20 at 07:34

0 Answers0