Abstract: Data persistence refers to an characteristic that data needs to outlive its creator. In recent years, NVM (Non-volatile Memory), a new type of computer memory supporting memory-like byte-addressable access and disk-like persistence, became a promising technique for facilitating data persistence in memory and its management. So far NVM has been supported in many programming languages such as C, C++ and Java. Meanwhile, it has not yet been well supported in JavaScript, a popular scripting language for software development. This paper presents JSNVM, an extension to JavaScript's runtime and execution engine, to support data persistence in JavaScript using NVM. JSNVM consists of (1) a JavaScript persistent object pool that serves as a persistent heap in which persistent objects are created and managed. This pool is also enhanced for guaranteeing data safety and consistency; and (2) a set of JavaScript persistent APIs that provide programmers with a support in creating, managing, and accessing persistent data in an easy-to-use and safe manner. We have implemented JSNVM and evaluated it against two database-supported data persistence styles (i.e., MongoDB's object store and indexedDB's binary store) on micro-benchmarks and real-world applications. The evaluation results show that compared with MongoDB's object store, JSNVM can achieve a 1.6× speedup; when applied to access binary data, JSNVM can achieve a 24.6× speedup over indexedDB's binary store, denoting that JSNVM can enhance performance of JavaScript applications in practice. JSNVM is planned to be publicly available by the end of 2018.
0 Replies
Loading