Web applications (apps) are programmed using HTML5, CSS, and JavaScript, and are distributed in the source code format. Web apps can be executed on any devices where a web browser is installed, allowing one-source, multiplatform environment. We can exploit this advantage of platform independence for a new user experience called app migration, which allows migrating an app in the middle of execution seamlessly between smart devices. This paper proposes such a migration framework for web apps where we can save the current state of a running app and resume its execution on a different device by restoring the saved state. We save the web app's state in the form of a snapshot, which is actually another web app whose execution can restore the saved state. In the snapshot, the state of the JavaScript variables and DOM trees are saved using the JSON format. We solved some of the saving/restoring problems related to event handlers and closures by accessing the browser and the JavaScript engine internals. Our framework does not require instrumenting an app or changing its source code, but works for the original app. We implemented the framework on the Chrome browser with the V8 JavaScript engine and successfully migrated non-trivial sample apps with reasonable saving and restoring overhead. We also discuss other usage of the snapshot for optimizations and user experiences for the web platform.
Web applications (apps) are programs created by web technologies such as HTML, CSS, and JavaScript. Web apps can be executed on any platform that supports a web browser. Such portability allows an interesting user experience called app migration, which can save an app's execution state to a file called snapshot, transmit it to another device, and continue the execution using the snapshot. However, existing approaches save all the states of the current app, regardless of its relevance to an app's state, making the snapshot size and snapshot creation time infeasibly large. For example, web apps are often programmed using web frameworks such as jQuery, which are libraries written in JavaScript to support app developments. We found that most objects created by frameworks during their initialization are not relevant to an app's state. Hence, one idea to reduce the snapshot size is not saving those framework objects in the snapshot but creating them after migration via re-initialization. Unfortunately, this is not always straightforward since the framework objects are intermingled with the app objects in the heap, possibly pointing to each other. To resolve this, we separated app objects that are attached to framework objects by monitoring app's execution and saved them to the snapshot. This paper proposes such a framework separated migration technique, with optimization to reduce the overhead, especially related to monitoring app's execution. With our approach, we could reduce the snapshot size by 89.1% on average and shorten the migration time by 47.6%, increasing the feasibility of app migration.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.