Publications

Detailed Information

Exploiting Snapshot for Web Applications : 웹 어플리케이션을 위한 스냅샷 활용

DC Field Value Language
dc.contributor.advisor문수묵-
dc.contributor.author오진석-
dc.date.accessioned2017-07-13T07:15:25Z-
dc.date.available2017-07-13T07:15:25Z-
dc.date.issued2016-02-
dc.identifier.other000000133648-
dc.identifier.urihttps://hdl.handle.net/10371/119192-
dc.description학위논문 (박사)-- 서울대학교 대학원 : 전기·컴퓨터공학부, 2016. 2. 문수묵.-
dc.description.abstractWeb 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, multi-platform 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. We 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 apps 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.
Another issues of web app is its performance. Web apps are involved with a performance issue due to JavaScript, because its dynamic typing, function object, and prototype are difficult to execute efficiently, so even just-in-time compilers do not help much.
We propose a new approach to accelerate a web app, especially its loading time. Generally, running an app is composed of app loading to initialize the app, followed by event-driven computation. If the same job needs to be done to load an app, especially the execution of the same JavaScript code, it will be better to save the JavaScript execution state in advance and to start the app from the saved state. In fact, app loading is often involved with the initialization of the web framework such as jQuery [1], Enyo [2] , or Ext JS [3] where many JavaScript objects are created. Also, app-specific objects are created during app loading. If we save the initialized state of these objects in the form of a snapshot and start app loading by restoring the objects from the snapshot, we would accelerate app loading.
Snapshot which saves JavaScript execution state has limitation because it cannot save DOM state. By using DOM Log-Replay which saves DOM state, we can save whole app loading state. Thus, we can remove all JavaScript execution during web app loading and directly reach the state which loading is completed by DOM snapshot, resulting in acceleration of web application loading time. DOM Log-Replay saves every DOM-related action occurs during loading time as a log. When restoring snapshot, log is replayed to restore DOM tree and various DOM elements. We actually implemented the idea for the web applications based on two web framework. This can reduce the whole app loading time by at least 60%, which could be noticed tangibly.
Because snapshot saves JavaScript state as file, there is size overhead. This can be an issue in device with small memory such as IoT. Thus, size of snapshot needs to be reduced. Firstly, we compress snapshot and hide decompression overhead by implementing pre-decompression which decompresses snapshot in another thread before snapshot deserialization. Secondly, we implemented framework snapshot sharing which shares snapshot of JavaScript framework between apps developed with the same framework. With these techniques, performance is degraded for about 1.7%, but memory overhead is dramatically reduced from 12x to 2.59x.
-
dc.description.tableofcontentsChapter 1. Introduction 1
1.1. Web Applications 1
1.2. Snapshot for Web Applications 2
1.3. Organization of the thesis 3

Chapter 2. How Web Apps Work 5
2.1. Web App Loading 5
2.2. JavaScript Execution State 9

Chapter 3. Migration of Web Applications 11
3.1. App Migration 11
3.2. App Migration Framework and Scenario 12
3.3. Saving and Restoring the App State 14
3.4. Issues for Saving and Restoring the App State 19
3.4.1. Object Reference Alias Problem 19
3.4.2. Saving Closure Function and Closure Variables 22
3.4.3. DOM Tree and DOM Reference Variable 26
3.4.4. Event Handler 28
3.5. Implementation 31
3.6. Evaluation 33
3.6.1. Experimental Environment 33
3.6.2. State Saving and Restoration Time Overhead 34
3.6.3. Snapshot File Size 35
3.6.4. Portion of State Save/Restoration 36
3.6.5. Number of Objects Saved and Restored 37
3.7. Other Usage of the Snapshot 38

Chapter 4. Loading Time Acceleration of Web Applications 40
4.1. Acceleration of Web Apps with Snapshot 40
4.2. Saving the JavaScript State 41
4.3. JavaScript Web Framework 43
4.4. Approach to Taking the Snapshot 46
4.5. Saving and Restoring the Snapshot 48
4.5.1. Approach to Save/Restore JavaScript State 48
4.5.2. Snapshot for JSC 49
4.5.3. Snapshot for V8 59
4.5.4. DOM Objects and Event Objects 66
4.6. Determinism for Snapshot 69
4.7. Experimental Results 72
4.7.1. Acceleration of Framework Initialization 73
4.7.2. Acceleration of Framework Initialization 75

Chapter 5. Enhanced Snapshot Optimization 78
5.1. Limitation of JavaScript Snapshot 78
5.2. Architecture for Enhanced Snapshot Optimization 79
5.3. DOM Log-Replay 81
5.3.1. Why DOM Log-Replay 81
5.3.2. Capturing DOM Log 84
5.3.3. Replay DOM 85
5.4. Pre-Decompressing Snapshot 86
5.5. Framework Snapshot Sharing 88
5.6. Evaluation 90
5.6.1. Environment 90
5.6.2. Benchmark Web App 91
5.6.3. Acceleration of Web Apps using DOM Log-Replay 91
5.6.4. Memory reduction by Pre-Decompressing 93
5.6.5. Memory reduction by Framework Sharing 94

Chapter 6. Related Works 96

Chapter 7. Conclusion 100

Bibliography 103

초록 106
-
dc.formatapplication/pdf-
dc.format.extent3509414 bytes-
dc.format.mediumapplication/pdf-
dc.language.isoen-
dc.publisher서울대학교 대학원-
dc.subjectweb app-
dc.subjectJavaScript-
dc.subjectsnapshot-
dc.subjectweb framework-
dc.subjectloading-time-
dc.subjectapp migration-
dc.subject.ddc621-
dc.titleExploiting Snapshot for Web Applications-
dc.title.alternative웹 어플리케이션을 위한 스냅샷 활용-
dc.typeThesis-
dc.contributor.AlternativeAuthorJinSeok Oh-
dc.description.degreeDoctor-
dc.citation.pagesviii, 108-
dc.contributor.affiliation공과대학 전기·컴퓨터공학부-
dc.date.awarded2016-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