-
-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repositories and Performance #253
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: