Disclosure: Improving Performance and Security of Web App Migration in Liquid Computing

Authors

  • Jae-Yun Kim Seoul National University, Seoul, Republic of Korea
  • Soo-Mook Moon Seoul National University, Seoul, Republic of Korea

DOI:

https://doi.org/10.13052/jwe1540-9589.2215

Keywords:

Web app migration, closure, code instrumentation, liquid computing, multiple migrations, secure migration

Abstract

Web app migration refers to capturing a snapshot of the execution state of a web app on a device and restoring it on another device to continue its execution for cross-device liquid computing. Although web apps are relatively easy to migrate due to their high portability, there is a JavaScript language feature called closure that complicates the migration since it requires migrating the variable states of already-finished outer functions. One approach to web app migration is to instrument the source code to trace the closure variables, yet this often suffers from performance slowdown, especially for multiple migrations. In this paper, we propose a new instrumentation-based technique called Disclosure, which moves the declarations of closure variables to a managed data structure and replaces the closure variables with the corresponding references to the data structure. This technique can improve runtime performance while enhancing security. We evaluated our work with eight Octane benchmarks and four real web apps. The runtime performance penalty due to Disclosure is 0–15%, which is a significant improvement over the results of the latest instrumentation-based work that supports similar deep closures and multiple migrations to Disclosure. Furthermore, real web apps are demonstrated to migrate seamlessly, even multiple times. Finally, Disclosure can hide data from exposure during migration with a secure migration technique using data encryption.

Downloads

Download data is not yet available.

Author Biographies

Jae-Yun Kim, Seoul National University, Seoul, Republic of Korea

Jae-Yun Kim received his bachelor’s degree in electrical and computer engineering from Seoul National University in 2015. He is a Ph.D. candidate studying at Virtual Machine and Optimization (VM&O) Laboratory in the Electrical and Computer Engineering Department at Seoul National University. He is currently a Founder and CEO of Superblock Co., Ltd., designing and implementing a new blockchain network focusing on lightweight node clients.

Soo-Mook Moon, Seoul National University, Seoul, Republic of Korea

Soo-Mook Moon received his Ph.D. at the University of Maryland, College Park, in 1993. During 1992–1993, he worked at IBM Thomas J. Watson Research Center, where he developed the IBM VLIW compiler. During 1993–1994, he was a software design engineer at the Hewlett-Packard Company in California Language Lab, where he contributed to developing an optimizing compiler for the PA-RISC CPUs. Since 1994, he has been with the faculty of the Seoul National University in the Department of Electrical and Computer Engineering, where he is now a full professor. Now, he leads the Virtual Machine and Optimization (VM&O) Laboratory in the Department of Electrical and Computer Engineering at Seoul National University. Research areas of VM&O Lab are blockchains, federated learning, compiler optimizations, language virtual machines, and web platform optimization.

References

Piotr Sroczkowski. 100 most popular languages on github in 2019. https://brainhub.eu/blog/most-popular-languages-on-github, 2020.

Federico Bellucci, Giuseppe Ghiani, Fabio Paternò, and Carmen Santoro. Engineering javascript state persistence of web applications migrating across multiple devices. In Proceedings of the 3rd ACM SIGCHI symposium on Engineering interactive computing systems, pages 105–110. ACM, 2011.

James Teng Kin Lo, Eric Wohlstadter, and Ali Mesbah. Imagen: runtime migration of browser sessions for javascript web applications. In Proceedings of the 22nd international conference on World Wide Web (WWW), pages 815–826. ACM, 2013.

JinSeok Oh, Jin-woo Kwon, Hyukwoo Park, and Soo-Mook Moon. Migration of web applications with seamless execution. In 2015 ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE). ACM, 2015.

Jin-woo Kwon and Soo-Mook Moon. Web application migration with closure reconstruction. In Proceedings of the 26th International Conference on World Wide Web (WWW), pages 133–142, 2017.

Julien Gascon-Samson, Kumseok Jung, Shivanshu Goyal, Armin Rezaiean-Asel, and Karthik Pattabiraman. Thingsmigrate: Platform-independent migration of stateful javascript iot applications. In 32nd European Conference on Object-Oriented Programming. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2018.

T. Mikkonen, K. Systa, and C. Pautasso. Towards liquid web applications. In Proceedings of the 2015 International Conference on Web Engineering (ICWE)., pages 134–143. Springer, 2015.

Jonathan Van der Cruysse, Lode Hoste, and Wolfgang Van Raemdonck. Flashfreeze: low-overhead javascript instrumentation for function serialization. In Proceedings of the 4th ACM SIGPLAN International Workshop on Meta-Programming Techniques and Reflection, pages 31–39, 2019.

JsonML. http://www.jsonml.org/.

MDN web docs: Weakmap. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap.

Iterable maps. https://github.com/tc39/proposal-weakrefs#iterable-weakmaps.

Octane Javascript benchmark. http://chromium.github.io/octane.

Hyuk-Jin Jeong, Inchang Jeong, and Soo-Mook Moon. Dynamic offloading of web application execution using snapshot. ACM Trans. Web, 14(4), jul 2020.

Maciej Zbierski and Przemyslaw Makosiej. Bring the cloud to your mobile: Transparent offloading of html5 web workers. In 2014 IEEE 6th International Conference on Cloud Computing Technology and Science, pages 198–203, 2014.

Hyuk-Jin Jeong, Chang Hyun Shin, Kwang Yong Shin, Hyeon-Jae Lee, and Soo-Mook Moon. Seamless offloading of web app computations from mobile device to edge clouds via html5 web worker migration. In Proceedings of the ACM Symposium on Cloud Computing, pages 38–49, 2019.

JinSeok Oh and Soo-Mook Moon. Snapshot-based loading-time acceleration for web applications. In 2015 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), pages 179–189. IEEE, 2015.

Google. Custom snapshot. https://v8.dev/blog/custom-startup-snapshots, 2018.

Hayden Adams, Noah Zinsmeister, Moody Salem, River Keefer, and Dan Robinson. Uniswap v3 core. Tech. rep., Uniswap, Tech. Rep., 2021.

Robert Leshner and Geoffrey Hayes. Compound: The money market protocol. White Paper, 2019.

Ethereum name service. https://ens.domains/.

Ipfs powers the distributed web. https://ipfs.tech/.

Protocol Labs. Filecoin: A decentralized storage network. Retrieved from: https://filecoin.io/filecoin.pdf, 2017.

Sam Williams and Will Jones. Archain: An open, irrevocable, unforgeable and uncensorable archive for the internet. DOI: https://www.arweave.org/whitepaper.pdf, 2017.

Ecma-262 edition 6.0 – ecmascript language specification. https://262.ecma-international.org/6.0/, 2015.

Jae-Yun Kim and Soo-Mook Moon. Disclosure: Efficient instrumentation-based web app migration for liquid computing. In International Conference on Web Engineering, pages 132–147. Springer, 2022.

Simon Thompson. Type theory and functional programming. Addison Wesley, 1991.

Addy Osmani. Learning JavaScript Design Patterns. O’Reilly, 2017.

Appel. Modern Compiler Implementation in C. Cambridge University Press, 1998.

Federico Bellucci, Giuseppe Ghiani, Fabio Paternò, and Carmen Santoro. Engineering javascript state persistence of web applications migrating across multiple devices. In Proceedings of the 3rd ACM SIGCHI Symposium on Engineering Interactive Computing Systems, page 105–110, 2011.

Jae-Yun Kim, Hyeon-Jae Lee, and Soo-Mook Moon. Fast snapshot migration using static code instrumentation: work-in-progress. In Proceedings of the 15th International Conference on Embedded Software. ACM, 2018.

A. Gallidabino and C. Pautasso. Maturity model for liquid web architectures. In Proceedings of the 2017 International Conference on Web Engineering (ICWE)., pages 206–224. Springer, 2017.

Kumseok Jung, Julien Gascon-Samson, Shivanshu Goyal, Armin Rezaiean-Asel, and Karthik Pattabiraman. Thingsmigrate: Platform-independent migration of stateful javascript internet-of-things applications. Softw: Pract Exper., 51, 2021.

Jin-woo Kwon, JinSeok Oh, InChang Jeong, and Soo-Mook Moon. Framework separated migration for web applications. In 2015 13th IEEE Symposium on Embedded Systems For Real-time Multimedia (ESTIMedia), pages 1–10. IEEE, 2015.

Hyuk-Jin Jeong and Soo-Mook Moon. Offloading of web application computations: A snapshot-based approach. In 2015 IEEE 13th International Conference on Embedded and Ubiquitous Computing, pages 90–97. IEEE, 2015.

Esben Andreasen, Liang Gong, Anders Møller, Michael Pradel, Marija Selakovic, Koushik Sen, and Cristian-Alexandru Staicu. A survey of dynamic analysis and test generation for javascript. ACM Comput. Surv., 50(5), 2017.

Timothy J Berners-Lee. Information management: A proposal. Technical report, 1989.

Wikipedia. Closure (computer programming) – Wikipedia, the free encyclopedia. http://en.wikipedia.org/w/index.php?title=Closure%20(computer%20programming)&oldid=886596565, 2020.

Ariya Hidayat et al. Esprima. http://esprima.org, 2020.

Yusuke Suzuki et al. Esprima. https://github.com/estools/estraverse, 2020.

Yusuke Suzuki et al. escodegen. https://github.com/estools/escodegen, 2020.

Mozilla Developer Network. Run-to-completion. https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#Run-to-completion, 2020.

Node.js. https://nodejs.org/, 2020.

LG. Webos open source edition. http://webosose.org/, 2018.

Samsung. Tizen. https://tizen.org/, 2020.

Google. Chrome v8 javascript engine. https://v8.dev.

Ecma-262 edition 5.1 – ecmascript language specification. https://262.ecma-international.org/5.1/, 2011.

Google. New multi-screen world: Understanding cross-platform consumer behavior. https://services.google.com/fh/files/misc/multiscreenworld_final.pdf, 2012.

Thingsjs. https://github.com/DependableSystemsLab/ThingsJS/tree/e46dae718b9822800bbd623bb95cc6de2c51d564, 2020.

Mdn web docs: Property accessors. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors, 2020.

Thomas Johnsson. Lambda lifting: Transforming programs to recursive equations. In Conference on Functional programming languages and computer architecture, pages 190–203. Springer, 1985.

John C Reynolds. Definitional interpreters for higher-order programming languages. In Proceedings of the ACM annual conference-Volume 2, pages 717–740. ACM, 1972.

Yasuhiko Minamide, Greg Morrisett, and Robert Harper. Typed closure conversion. In Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 271–283. ACM, 1996.

Olivier Danvy and Lasse R Nielsen. Defunctionalization at work. In Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming, pages 162–174. ACM, 2001.

JiHwan Yeo, JinSeok Oh, and Soo-Mook Moon. Accelerating web application loading with snapshot of event and dom handling. In Proceedings of the 28th International Conference on Compiler Construction, pages 111–121, 2019.

JiHwan Yeo, ChangHyun Shin, and Soo-Mook Moon. Snapshot-based loading acceleration of web apps with nondeterministic javascript execution. In Proceedings of the The 2019 World Wide Web Conference (WWW’19), 2019.

Yong-Hwan Yoo and Soo-Mook Moon. Snapshot-based migration of es6 javascript. In Proceedings of the The 2021 International Conference on Web Engineering (ICWE 2021), 2021.

Hyuk-Jin Jeong, InChang Jeong, Hyeon-Jae Lee, and Soo-Mook Moon. Computation offloading for machine learning web apps in the edge server environment. In 2018 IEEE 38th International Conference on Distributed Computing Systems (ICDCS), pages 1492–1499. IEEE, 2018.

Hyuk-Jin Jeong, Hyeon-Jae Lee, Chang Hyun Shin, and Soo-Mook Moon. Ionn: Incremental offloading of neural network computations from mobile devices to edge servers. In Proceedings of the ACM Symposium on Cloud Computing, pages 401–411, 2018.

Downloads

Published

2023-04-20

How to Cite

Kim, J.-Y. ., & Moon, S.-M. . (2023). Disclosure: Improving Performance and Security of Web App Migration in Liquid Computing. Journal of Web Engineering, 22(01), 79–104. https://doi.org/10.13052/jwe1540-9589.2215

Issue

Section

ICWE2022