In this paper, we present the design, implementation, and evaluation of SINATRA, which supports instantaneous browser updates that do not result in any data loss through a novel Multi-Version eXecution (MVX) approach for JavaScript programs. SINATRA works in pure JavaScript, does not require any browser support, thus works on closed-source browsers, and requires trivial changes to each target page, that can be automated. First, SINATRA captures all the non-determinism available to a JavaScript program (e.g., event handlers executed, expired timers, invocations of Math.random). Our evaluation shows that SINATRA requires 5MB to store such events, and the memory grows at a modest rate of 23.1KB/s as the user keeps interacting with each page. When an update becomes available, SINATRA transfer the state by re-executing the same set of non-deterministic events on the new browser. During this time, which can be as long as 13 seconds, SINATRA uses MVX to allow the user to keep interacting with the old browser. Finally, SINATRA changes the roles in 353ms, and the user starts interacting with the new browser, effectively performing a browser update with zero downtime and no loss of state.
翻译:在本文中,我们介绍SINATRA的设计、实施和评估,SINATRA支持瞬时浏览器更新,而该更新不会通过对 JavaScript 程序采用新的多版本 eX 方法导致任何数据丢失。 SINATRA在纯 JavaScript 中工作,不需要浏览器支持,因此不需要对封闭源浏览器进行操作,需要对每个目标页面进行小小改动,这可以自动化。首先,SINATRALA捕获了JavaScript 程序可以使用的所有非确定性事件(例如,事件处理器被执行,过期的定时器,数学.random ) 。我们的评估显示, SINATRA 需要5MB 来存储这些事件,而记忆以23.1KB/s 的低速增长速度增长, 因为用户不断与每页进行互动。当更新时,SINARA通过重新操作新的非确定性事件集,将状态转换为新浏览器。在此期间,SINATRA 使用MIX 开始与旧的服务器进行新的更新。