Skip to main navigation Skip to search Skip to main content

A Runtime and Application Framework for Orthogonal Persistence in JavaScript.

  • Gillis Vanginderachter ((PhD) Student)
  • Tom Van Cutsem (Promotor)

Student thesis: Master's Thesis

Abstract

We are living in the internet age, where web applications are becoming more and more widespread. Web applications are even becoming a viable alternative for "traditional" desktop applications. JavaScript is the most widely used and supported programming language to write web applications. Recent advancements in the efficiency of JavaScript engines have even made the use of JavaScript on the server viable, as illustrated by the uprising Node.js project.

As these web applications must store user data somewhere, persistence remains a core requirement. State of the art solutions allow web applications to store data on the server side, i.e. in an RDBMS or NoSQL data store, or on the client-side, i.e. using HTML5 APIs. Persistence remains a thorny subject, as it requires a lot of programming effort organizing persistent and non-persistent data and serializing and deserializing data.

In this thesis we introduce an orthogonally persistent JavaScript engine. Orthogonal persistence takes a completely different approach to persistence when compared to "traditional" three-tier applications. In orthogonally persistent programming languages the whole runtime is made persistent, i.e. all data in the runtime, independent of its type, is automatically persisted. We developed V8Ken, an orthogonally persistent JavaScript engine, which essentially is a fusion of the Ken library and the V8 JavaScript engine. The Ken library masks crash-restart failures, while the V8 JavaScript engine is the most efficient JavaScript engine currently available.

The orthogonality of orthogonal persistence is not always beneficial. Orthogonal persistence does not offer the same features as traditional external databases such as schema definition and validation, querying mechanisms and transactions. There is no effective way to manage data and such an undifferentiated pool of objects can be hard to manage, comprehend and debug. We therefore introduce nodb.js, a JavaScript framework to be used in combination with an orthogonally persistent JavaScript engine. This framework alleviates the aforementioned shortcomings of orthogonal persistence.

A comparison between an application using the nodb.js framework and a traditional database makes clear that our approach is very promising as it allows the programmer to write simpler and more maintainable code. Benchmarks indicate, however, that the nodb.js framework is not yet sufficiently optimized to be deployed at scale.
Date of Award5 Jul 2013
Original languageEnglish
SupervisorTom Van Cutsem (Promotor)

Keywords

  • JavaScript
  • Orthogonal Persistence

Cite this

'