Proxy Object Application State Synchronization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions, such as Anbox, fail to synchronize the state of Android applications between the Linux and Android operating systems, leading to inconsistencies that inconvenience user operations.
Innovation Solution
A method for application state synchronization is implemented by establishing a connection between the first and second operating systems, allowing the first operating system to send operation requests to the second operating system and updating a proxy object with the target application's state, ensuring synchronization through a first application manager and other system components like the window and task managers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a connection is established between the first operating system and the second operating system to enable operation requests to be sent, then the ability to control and update application states is improved, but the system complexity increases due to the need for proxy objects and inter-system communication mechanisms
Solution Approach 1:
A proxy object is introduced as an intermediary between the first operating system and the second operating system. The proxy object resides in the first OS and maintains application state information, mediating communication between the two systems. When the second OS receives an operation request, it updates the application state and notifies the proxy object, which then updates the corresponding record in the first OS, achieving state synchronization without direct complex inter-OS communication.
Solution Approach 2:
The proxy object creates a copy or representation of the application state from the second operating system within the first operating system. Instead of maintaining complex real-time synchronization mechanisms, the system copies essential state information into the proxy object, which can be updated independently and then reflected back to the first OS, simplifying the overall system architecture.
2Reliability
If the first operating system sends operation requests to the second operating system and updates proxy objects, then application state consistency is improved, but the operation time increases due to additional communication and update steps
Solution Approach 1:
The proxy object is created and initialized in advance within the first operating system, containing the necessary structure and initial state information before any operation requests are sent. This preliminary setup eliminates the need to create or initialize data structures during runtime operations, reducing the time required for state synchronization when operations occur.
Solution Approach 2:
The second operating system provides feedback to the proxy object when application state changes occur. After an operation is performed in the second OS, the system sends a notification back to the proxy object with the updated state information, which then updates the first OS. This feedback mechanism ensures state consistency while optimizing the timing of updates to occur only when necessary, rather than continuous synchronization.
Data Source
AI summary
The disclosure provides methods, apparatus, electronic devices, storage media, computer program products and computer programs for application state synchronization, which are applied to electronic devices. The electronic device runs a first operating system and a second operating system running in the first operating system in a containerized manner. One of the methods includes, in response to a target operation on a target application by a user, controlling the first operating system to send a target operation request to the second operating system. The target application is an application program of the second operating system included in the first operating system. The target operation is performed in the second operating system and the second operating system is controlled to send a target operation success message to the first operating system. A proxy object of the target application is updated in the first operating system. operation.


