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
I am a fan of DDD and in my projects, I try to adhere to this approach. But there is one problem for which I cannot come up with a beautiful solution. And your code has this problem too.
The moment concerns the implementation of the AccountRepository and the Account aggregate - you load all transactions for the account into memory. If there are few transactions, then this is not a problem. However, if the number of transactions is huge (for example 1,000,000), then this will lead to a significant decrease in performance (and possibly degradation of the database).
What approach do you think will help avoid such problems and allow you to stay within the DDD?
The text was updated successfully, but these errors were encountered:
Hello!
Thank you for the perfect DDD-example!
I am a fan of DDD and in my projects, I try to adhere to this approach. But there is one problem for which I cannot come up with a beautiful solution. And your code has this problem too.
The moment concerns the implementation of the AccountRepository and the Account aggregate - you load all transactions for the account into memory. If there are few transactions, then this is not a problem. However, if the number of transactions is huge (for example 1,000,000), then this will lead to a significant decrease in performance (and possibly degradation of the database).
What approach do you think will help avoid such problems and allow you to stay within the DDD?
The text was updated successfully, but these errors were encountered: