Data Model Slicing: Smarter Data Replication Models for Tierless Web Apps

Printer-friendly version

- Interested in web development and programming language design

- Any prior knowledge of Javascript is a plus


Browsers are becoming the operating systems of the web with Javascript as the underlying virtual machine. Rich internet applications with lots of interactive features are omnipresent. Web applications have the advantage of being available everywhere and on any platform. Often seamlessly sharing your application data between different devices. However, realizing such advanced features in a traditional three-tier architecture requires developers to select and master a myriad of technologies because each tier comes with its own technology stack.

Tierless programming languages aim to reduce this complexity. They enable developing a web application as a single mono-linguistic application, which renders its development alike to that of a desktop application. A preprocessor or the runtime of these languages realizes a split into a client, server and sometimes a database tier, where communication between the different tiers is handled transparently.

One downside of traditional rich internet applications is that they require a stable internet connection which means they do not provide the same user experience as native operating system applications. When the user's connection slows down or is lost some features of the application might also slow down or become unresponsive.

An existing technique to enable a true offline experience is by replicating application state from the server to the different clients. However, existing techniques often replicate the entire application state to every client which can be unfeasible for various reasons. First, this is a problem for applications with a large data set. For example, increasing the offline user experience for a website such as Wikipedia would require enabling offline availability for only certain articles and not the entire database. Second, if the dataset includes user-specific data then replicating the entire dataset to all clients might cause security leaks.

Goal & Research Activities: 

At the Software Languages Lab, we developed a tier-splitting tool called STiP.js that is able to split a tierless JavaScript program into the client and server tier. The goal of this thesis is to investigate how advanced data replication models can be integrated with this tier-splitting compiler.

More specifically, the goal of this thesis is designing some language constructs or annotations that enable replication of shared state for the tier-splitting compiler. With these annotations you should be able to specify what parts of the state should be replicated and how the replication strategy should work. This replication strategy can be split in two parts. First, in the case where the data is eagerly replicated to the different clients there should be a way to guide the compiler in slicing the shared state such that different clients get only their part of the replicated state. Second is enabling lazy replication of shared state. In this case the framework should only replicate state on a per-use basis. However, some language constructs might help the framework in replicating a larger set of the data if it can predict what slice of the data can become relevant in the future. For example, in the case of Wikipedia one might be interested in not only replicating the current article for offline availability but also every article that is related to the current one.