Please log in to watch this conference skillscast.
In this talk, David will describe how they use Commutative Replicated Data Types (CRDTs) at Whisk to provide a seamless, cross-device shopping list. CRDTs are general-purpose patterns for achieving eventually-consistent synchronisation. They achieve this by communicating in operations - “diffs” between one state and the next - which have magical properties of being replayable (idempotence) in any order (commutativity). Operations can be recorded in an operations log and used to reconstruct current state on a client, whilst respecting that client’s own local state. One of the concerns with using CRDTs is that this log of operations can grow indefinitely.
Whisk is a shopping list app that connects online recipes to online and offline supermarkets. Their users build their shopping lists from online recipes using embedded widgets, browser extensions, our webapp, and our mobile apps. Their lists must stay in sync, or they won’t eat. To complicate matters, users carry their lists with them to supermarkets - the best naturally-occurring examples of Faraday cages. Whisk's apps must work seamlessly with very patchy networks, but also in fully offline mode. To achieve this, their apps use local storage, and sync mechanisms use CRDTs.
Whisk have implemented two specific CRDTs to support shopping lists at Whisk, provided to their clients through an API built with Scala and underpinned by Cassandra. David will describe their approach and architecture, and discuss some practical measures they've taken to address the problem of an ever-growing operations log.
This talk should appeal to anyone interested in cross-device data synchronisation, and practical applications of Scala.
YOU MAY ALSO LIKE:
- Modern development with Java (in London on 26th - 28th June 2017)
- Kito Mann's Hacking HTML5 Web Components and Polymer (in London on 10th - 11th July 2017)
- F# eXchange 2018 (in London on 5th - 6th April 2018)