Publications

Detailed Information

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

DC Field Value Language
dc.contributor.advisor문수묵-
dc.contributor.author권진우-
dc.date.accessioned2018-05-28T16:21:42Z-
dc.date.available2018-05-28T16:21:42Z-
dc.date.issued2018-02-
dc.identifier.other000000149585-
dc.identifier.urihttps://hdl.handle.net/10371/140676-
dc.description학위논문 (박사)-- 서울대학교 대학원 : 공과대학 전기·컴퓨터공학부, 2018. 2. 문수묵.-
dc.description.abstractWeb 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.
-
dc.description.tableofcontents1 Introduction 1
1.1 Web Application Migration 1
1.2 Limitations of Previous Approaches 2
1.3 Outline of the Dissertation 3
2 Enhancements for Web Application Migration 5
2.1 Execution model of JavaScript 5
2.2 Previous approaches 8
2.3 Challenges 9
2.3.1 Nested environments 11
2.3.2 with statement 11
2.3.3 This binding 12
2.4 Closure reconstruction 13
2.4.1 Overall design 13
2.4.2 Scope information collection 15
2.4.3 Scope tree building 16
2.4.4 Function reordering 17
2.4.5 Code generation 18
2.5 Evaluation 20
2.5.1 Experimental Environment 20
2.5.2 Scope tree analysis 21
2.5.3 Restoration code size 22
2.5.4 Serialization time 22
2.5.5 Limitation test 24
3 Framework Separated Migration 26
3.1 Motivation 26
3.1.1 JavaScript Framework 27
3.1.2 Overheads of JavaScript Frameworks in App Migration 28
3.2 Framework Separated Migration Approach 29
3.3 Challenges and Our Approach 30
3.3.1 Distinguishing objects 31
3.3.2 Implicit attachment 32
3.3.3 Explicit attachment 35
3.3.4 Object referencing 37
3.4 Execution flow 38
3.5 Implementation of FSM 41
3.5.1 Object.observe 41
3.5.2 General Implementation 43
3.5.3 Case study: jQuery, MooTools, Prototype 45
3.6 Evaluation 47
3.6.1 Experimental Environment 47
3.6.2 Snapshot Size 49
3.6.3 Migration Time 50
3.6.4 Loading time overhead 52
3.7 Discussion 53
3.7.1 Web apps employing multiple frameworks 53
3.7.2 Dealing with advanced frameworks 53
4 Web Delta Migration 55
4.1 Introduction 55
4.2 Background 56
4.2.1 Execution States of a Web App 56
4.2.2 Web App Migration 58
4.3 Motivation 59
4.3.1 JavaScript Library 59
4.3.2 Empirical Study 59
4.4 Scenario 60
4.5 Challenges 61
4.5.1 Dynamically Changing Object Shape 61
4.5.2 Object Reference Alias Problem 62
4.5.3 Function Closure 63
4.5.4 Re-registering Event Handlers 63
4.6 Implementation 64
4.6.1 System Overview 64
4.6.2 Directed Graph Model 65
4.6.3 DOM Patch Generation 67
4.6.4 JavaScript Patch Generation 69
4.7 Evaluation 71
4.7.1 Experimental Setup 72
4.7.2 Modified Objects Analysis 73
4.7.3 Serialized File Size 74
4.7.4 Total Migration Time 75
5 Related Works 76
6 Conclusion 79
Abstract (In Korean) 85
-
dc.formatapplication/pdf-
dc.format.extent1926525 bytes-
dc.format.mediumapplication/pdf-
dc.language.isoen-
dc.publisher서울대학교 대학원-
dc.subjectWeb Application-
dc.subjectJavaScript-
dc.subjectSerialization-
dc.subjectMigration-
dc.subjectProductivity-
dc.subjectOptimization-
dc.subject.ddc621.3-
dc.titleEnhancements and Optimizations for Web Application Migration-
dc.title.alternative웹 앱 마이그레이션 개선 및 최적화-
dc.typeThesis-
dc.description.degreeDoctor-
dc.contributor.affiliation공과대학 전기·컴퓨터공학부-
dc.date.awarded2018-02-
Appears in Collections:
Files in This Item:

Altmetrics

Item View & Download Count

  • mendeley

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

Share