Publications

Detailed Information

Enhancements and Optimizations for Web Application Migration : 웹 앱 마이그레이션 개선 및 최적화

Cited 0 time in Web of Science Cited 0 time in Scopus
Authors

권진우

Advisor
문수묵
Major
공과대학 전기·컴퓨터공학부
Issue Date
2018-02
Publisher
서울대학교 대학원
Keywords
Web ApplicationJavaScriptSerializationMigrationProductivityOptimization
Description
학위논문 (박사)-- 서울대학교 대학원 : 공과대학 전기·컴퓨터공학부, 2018. 2. 문수묵.
Abstract
Web apps can play an important role for the era of ubiquitous computing since they can run on any smart or IoT devices equipped with a browser. This advantage of portability and simplicity can be extended further to allow an interesting user experience called web app migration. That is, we can save the execution state of a running web app in the form of another web app called the snapshot, transmit it to another device, and continue the execution by simply running the snapshot on the browser.
In this paper, we study and develop the web app migration framework in various ways. This paper is composed of two main parts. The enhancements part advances the framework by supporting a JavaScript language feature that is challenging to serialize, yet is frequently used in the real world. The optimizations part advances the framework by minifying the size of the serialized result and thus accelerates the migration process.
We enhanced the web app migration framework by serializing JavaScript closures. In JavaScript semantics, one of the language features that does not allow easy app migration is a closure. A JavaScript function can access variables defined in its outer function even if the execution of the outer function is terminated. It is allowed because the inner function is created as a closure such that it contains the outer function's environment. This feature is widely used in web app development because it is the most common way to implement data encapsulation in web programming. Closures are not easy to serialize because environments can be shared by a number of closures and environments can be created in a nested way. In this part, we propose a novel approach to fully serialize closures. We created mechanisms to extract information from a closure's environment through the JavaScript runtime and to serialize the information in a proper order so that the original relationship between closures and environments can be restored properly. We implemented our mechanism on the WebKit browser and successfully migrated Octane benchmarks and seven real web apps which heavily exploit closures. We also show that our mechanism works correctly even for some extreme, closure-heavy cases.
We took two approaches to optimize the speed of the migration process. First, we attempted to reduce the size of the serialized result (snapshot) by separating JavaScript frameworks. Previous approaches save all the states of the current app, regardless of its relevancy 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. So, 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. We propose such a framework-separated migration technique, with optimization to reduce the overhead, especially related to monitoring app's execution. With the 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.
Although the first approach achieved noticeable results, some limitations had been exposed. The approach is limited to some simple frameworks that are easy to separate between the framework objects and the app objects. The framework objects and app objects found in web apps using recent frameworks are much more intermingled, so separating them requires huge analyses and efforts. Also, it is not sustainable to update the app migration framework every time when the supporting web frameworks have been updated. Another limitation is it only supports separating web frameworks. If app objects are large and they are hardly modified, there are more room to optimize by separating the app objects as well. This lead to the second approach, which we named WebDelta. WebDelta traverses the current state of every object in a heap and save only those that are modified from the initial state. We modeled the relationships between JavaScript objects as a directed graph to efficiently and completely serialize the delta of JavaScript states. Also, we identified and resolved challenges regarding serializing event handlers attached to the DOM (Document Object Model) objects. The evaluation showed that our approach could reduce 93% of the serialized file size and 63% of the total migration time.
Language
English
URI
https://hdl.handle.net/10371/140676
Files in This Item:
Appears in Collections:

Altmetrics

Item View & Download Count

  • mendeley

Items in S-Space are protected by copyright, with all rights reserved, unless otherwise indicated.

Share