microstream
microstream copied to clipboard
Rollback / Reload Functionality
In order to synchronize the object graph with the storage data, a reload functionality has been requested; like a rollback function in other frameworks.
Basically it is doable right now, with the given API. But a convenient reload(Object)
method in the storage manager would be a better experience.
Based on a discussion on another issue, this might not be desirable. Rollback assumes that the state of the memory is not the primary source but the external storage is. This goes against the idea
Write an application as if there were no such thing as a database. And then use MicroStream just as a subsidiary data saving layer. Nothing more. Especially no application-cheating special purpose mechanisms.
Rollback assumes that the state of the memory is not the primary source, but the external storage is.
While that is true, there are actual use cases where a reload functionality can come in handy. In discussions with colleagues and customers emerged that there is a need for this feature. I would offer this as a utility type, not inside the top-level API.