Behavioural Types for Local-First Software

05/08/2023
by   Roland Kuhn, et al.
0

Peer-to-peer systems are the most resilient form of distributed computing, but the design of robust protocols for their coordination is difficult. This makes it hard to specify and reason about global behaviour of such systems. This paper presents swarm protocols to specify such systems from a global viewpoint. Swarm protocols are projected to machines, that is local specifications of peers. We take inspiration from behavioural types with a key difference: peers communicate through an event notification mechanism rather than through point-to-point message passing. Our goal is to adhere to the principles of local-first software where network devices collaborate on a common task while retaining full autonomy: every participating device can locally make progress at all times, not encumbered by unavailability of other devices or network connections. This coordination-free approach leads to inconsistencies that may emerge during computations. Our main result shows that under suitable well-formedness conditions for swarm protocols consistency is eventually recovered and the locally observable behaviour of conforming machines will eventually match the global specification. The model we propose elaborates on an existing industrial platform and provides the basis for tool support (sketched here and fully described in a companion artifact paper), wherefore we consider this work to be a viable step towards reasoning about local-first and peer-to-peer software systems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/15/2023

Behaviorally Typed State Machines in TypeScript for Heterogeneous Swarms

A heterogeneous swarm system is a distributed system where participants ...
research
09/26/2011

Distributed Reasoning in a Peer-to-Peer Setting: Application to the Semantic Web

In a peer-to-peer inference system, each peer can reason locally but can...
research
05/07/2020

Collaborative Deanonymization

We propose protocols to resolve the tension between anonymity and accoun...
research
02/03/2023

Hybrid Multiparty Session Types – Full Version

Multiparty session types (MPST) are a specification and verification fra...
research
11/23/2022

Ping-Pong Swaps

We propose Ping-Pong Swaps: A secure pure peer-to-peer crosschain swap m...
research
07/08/2021

Generalising Projection in Asynchronous Multiparty Session Types

Multiparty session types (MSTs) provide an efficient methodology for spe...
research
07/17/2023

2P-BFT-Log: 2-Phase Single-Author Append-Only Log for Adversarial Environments

Replicated append-only logs sequentially order messages from the same au...

Please sign up or login with your details

Forgot password? Click here to reset