Variable Persister Service for Software Application State Persistence
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing applications require extensive coding to implement the archiving and unarchiving of customizable variables, which is time-consuming and prone to errors, to persist user settings across application terminations and relaunches.
Innovation Solution
A variable persister service that automatically archives and retrieves variables from non-volatile storage, allowing applications to declare variables as persistent, enabling efficient persistence across application terminations and relaunches, with periodic archiving to maintain variable states even during crashes or sudden terminations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If applications write numerous lines of programming code to perform archiving and unarchiving operations, then variables can be persisted across termination and relaunch, but the coding process becomes time-consuming and error-prone
Solution Approach 1:
The variable persister service performs archiving and unarchiving operations automatically without requiring application developers to write custom persistence code. The service monitors application variables and handles persistence transparently, allowing variables to be persisted simply by declaring them as such in the application code.
Solution Approach 2:
The variable persister acts as an intermediary between the application and the storage system. It provides a layer of abstraction that handles the complex tasks of archiving and unarchiving variables, shielding the application from the underlying storage mechanisms and eliminating the need for developers to implement persistence logic directly.
2Reliability
If applications implement extensive archiving and unarchiving code, then customized settings can be saved and retrieved, but the complexity of the application increases
Solution Approach 1:
The variable persister service automatically handles persistence operations without requiring application developers to implement custom archiving and unarchiving logic. Developers simply need to declare variables as persistent, and the service manages all the complexity of saving and retrieving these variables transparently.
Solution Approach 2:
The variable persister serves as an intermediary layer between the application and storage systems, absorbing the complexity of persistence management. It provides standardized interfaces for archiving and unarchiving variables, eliminating the need for applications to deal with low-level storage details and reducing overall code complexity.
3Reliability
If applications rely on normal termination procedures for saving variables, then variables can be persisted, but data is lost during crashes or sudden shutdowns
Solution Approach 1:
The variable persister performs preliminary archiving actions by periodically saving variable states during application operation, not just during normal termination. This ensures that even if the application crashes or is suddenly shut down, the most recent variable values have already been saved to storage, preventing data loss.
Solution Approach 2:
The variable persister provides a safety mechanism that cushions against the harmful effects of crashes or sudden shutdowns. By implementing periodic archiving and continuing to save variables even during abnormal termination conditions, the system ensures data persistence reliability without requiring perfect normal termination procedures.
Data Source
AI summary
Some embodiments of the invention provide a variable persister that allows an application running on a device to efficiently make a set of variables persistent across termination and relaunch of the application. According to some embodiments of the invention, an application executing on the device can utilize this archiving service by simply having its persisted variables declared in the application's code as variables that are to be persisted. Based on such declarations, the variable persisting service of the device stores the values of the set of persisted variables in a non-volatile storage archive (e.g., disk, flash storage, etc.) when the application terminates, and retrieves these values from the archive when the application restarts such that the values of the persisted variables are restored to a state before the application was last terminated.


