Data Model Slicing: Smarter Data Replication Models for Tierless Web Apps
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.
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.
- STiP.js: https://soft.vub.ac.be/~lphilips/stip