Skip to content
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

Open
oleg-varlamov opened this issue Jan 15, 2021 · 0 comments
Open

Repositories and Performance #253

oleg-varlamov opened this issue Jan 15, 2021 · 0 comments

Comments

@oleg-varlamov
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant