Description:
Processing a serialization request in a background-thread, allowing the application to continue
Use-Case:
When using serialization to continuously / regularly store the current state of data (“snapshot”), serialization should interfere with the main application to a minimum extent.
Implementation:
There are two challenges here: 1 modifications of the DataStorage being serialized and 2. Error handling
- Since most objects are ridiculously small (Properties!), they could be cloned nearly instantaneously. For the rest, we’d need read-locks or copy-on-write or something.
- There is not much error handling possible in any case. Good reporting is all we can do. This can be asynchronous.
Question:
Make an effort vs reward vs risk analysis. Does the added instability/complexity justify the result and effort?