Skip to content

Syncing strategies for mobile apps. A Protocol for Peer-to-Peer Data Synchronization.

Notifications You must be signed in to change notification settings

mirkokiefer/syncing-thesis

Repository files navigation

Syncing Strategies for Mobile Devices

Histo: A Protocol for Peer-to-Peer Data Synchronization in Mobile Apps

Mirko Kiefer, published 2013 at Database Systems Research Group, Heidelberg University

Building collaborative apps that sync data among a group of users is hard.
The widespread adoption of mobile devices with limited network access requires the offline availability of data and apps.
Some aspects of syncing are often application specific and can therefore not be solved in a generic way.
However there are recurring patterns that can be used to build application specific solutions. The goal of this thesis is to develop a syncing framework that speeds up the development of collaborative apps.

Abstract

Inspired by distributed version control for source code we develop Histo, which is a framework for peer-to-peer data synchronization in mobile applications.

Our objectives when developing Histo are driven by exemplaric workflows in a collaborative task manager. We see offline support as a key requirement of modern mobile applications. Histo is designed to keep all data locally on the client device to ensure a user is not blocked from using an application.

Every application has a different data model, we develop methods to support flexible data models. We show that by mapping an application’s data to a hierarchical model, we can efficiently synchronize data.

Locking mechanisms are shown to be non-feasible when working with loosely connected devices. The synchronization protocol, which is at the heart of Histo, is therefore designed to work without any locking logic. We instead rely on a concept of optimistic synchronization, which guarantees eventual consistency of an application’s data. Handling concurrent edits and resulting conflicts correctly is another core element of Histo. Histo merges concurrent edits and identifies conflicts using three-way-merging. We find that the only way to implement three-way-merging in a distributed setting is by tracking the edit history on each device.

Histo’s synchronization protocol is shown to perform well in a range of network topolo- gies. The most extreme cases being client-server and peer-to-peer. For each network topology, we show how assumptions we make on the data history allows to minimize the amount of data stored on each device.

We focus on developing a practical solution that works on a broad range of devices. Histo is therefore implemented with open web standards. To our knowledge there are no publicly available solutions with these objectives.

We see potential to continue the work by exploring other application scenarios and adding support for different types of data. This could include conflict handling support for specialized data structures like those of a spreadsheet or a text editor.