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

支持某些聚合根不需要常驻内存 #62

Open
tangxuehua opened this issue Nov 19, 2016 · 1 comment
Open

支持某些聚合根不需要常驻内存 #62

tangxuehua opened this issue Nov 19, 2016 · 1 comment

Comments

@tangxuehua
Copy link
Owner

假设你的场景是,创建聚合根很频繁,但是修改聚合根很不频繁,然后聚合根的大小又比较大,比如文章(包括了内容)。这种场景,文章创建后,只要事件持久化到了eventstore,然后文章聚合根不需要保存在内存(当然,这个是你为了节省内存的前提)。
这个需求,目前还不支持,目前聚合根创建出来后一定是会放在内存的。

设计思路:
聚合根加特性,标记是否需要常驻内存,或者缓存保留时间之类的

@zsy619
Copy link

zsy619 commented Nov 19, 2016

汤总比较神速~~~
限制聚合根大小:将大字段(文章内容)另外存储到key-value中,聚合跟对key进行关联。

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

2 participants