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

Implement ReasonableStorer #588

Open
JohannesRabauer opened this issue Jun 16, 2023 · 0 comments
Open

Implement ReasonableStorer #588

JohannesRabauer opened this issue Jun 16, 2023 · 0 comments

Comments

@JohannesRabauer
Copy link
Contributor

Is your feature request related to a problem? Please describe.

For beginners with MicroStream it's kind of hard to understand, what exactly should get stored. (Always store "Reference holder", so for example if you change a list, you must store the list and not the object referencing the list)

From https://docs.microstream.one/manual/storage/storing-data/lazy-eager-full.html:
LazyStorer: Referenced instances are stored only if they have not been stored yet. If a referenced instance has been stored previously it is not stored again even if it has been modified.
EagerStorer: In eager storing mode referenced instances are stored even if they had been stored before. Contrary to Lazy storing this will also store modified child objects at the cost of performance.

Describe the solution you'd like

I propose a new Storer-Type (f.e. ReasonableStorer) where you can for example always throw in the Root-Object and the storer traverses the complete tree and saves all changes.
This is a terribly poorly performing Storer, but this would decrease the entry barrier for beginners of MicroStream and decrease complexity of code for small data stores.

Describe alternatives you've considered

If you use the store-Method mindfully, this storer-type is not needed.

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