Offworker:平行化網頁程式的卸載框架
Offworker: An Offloading Framework for Parallel Web Applications
摘要
由於行動裝置越來越普及以及無線通訊技術越來越進步,越來越多的應用程式正在從傳統的桌面應用軟體移轉成網頁應用程式。Web Worker API因而被制訂,它讓應用程式可以將計算繁重的工作從應用程式的主執行序卸載到其他的工作執行序(或稱做Web Worker),使得主執行序可以專注處理使用者介面和互動,進而改善使用者操作體驗。先前的研究證實透過將Web Worker分配到遠端的伺服器來卸載計算繁重的工作可以改善網頁應用程式的效能,但是那些研究的實作可能會有潛在的安全性漏洞,同時他們也並未考慮一些應用程式可能會用多個Web Worker來實現並行化或平行化的程式。在這篇論文中,我們實現了一個卸載框架(稱做Offworker),可以透通地卸載並行的Web Worker到邊緣節點或雲端伺服器,同時也提供Web Worker更安全的執行環境。我們設計了一套基準測試集(稱做Rodinia-JS)來評估我們的框架,這是由Rodinia平行化基準測試集改寫成JavaScript的版本。實驗證實Offworker在將Web Worker從行動裝置卸載到伺服器之後,可以有效的改進平行程式效能(最多達4.8倍加速),而Offworker在計算密集型的應用程式中,僅比原生執行多了12.1%幾何平均的間接費用。我們相信Offworker提供平行化網頁應用程式一個有前景且安全的計算卸載解決方案。
More and more applications are shifting from traditional desktop applications to web applications due to the prevalence of mobile devices and recent advances in wireless communication technologies. The Web Workers API has been proposed to allow for offloading computation-intensive tasks from applications’ main browser thread, which is responsible for managing user interfaces and interacting with users, to other worker threads (or web workers) and thereby improving user experience. Prior studies have further offloaded computation-intensive tasks to remote servers by dispatching web workers to the servers and demonstrated their effectiveness in improving the performance of web applications. However, the approaches proposed by these prior studies expose potential vulnerabilities of servers due to their design and implementation and do not consider multiple web workers executing in a concurrent or parallel manner. In this paper, we propose an offloading framework (calledOffworker) that transparently enablesconcurrentweb workers to be offloaded to edge or cloud servers and provides a more secure execution environment for web workers. We also design a benchmark suite (called Rodinia-JS), which is a JavaScript version of the Rodinia parallel benchmark suite, to evaluate the proposed framework. Experiments demonstrated that Offworker effectively improved the performance of parallel applications (with up to 4.8x of speedup) when web workers were offloaded from a mobile device to a server. Offworker introduced only a geometric mean overhead of 12.1%against the native execution for computation-intensive applications. We believe Offworker offers a promising and secure solution for computation offloading of parallel web application