SyncFree (FP7)
Large-scale computation without synchronization
Christopher Meiklejohn
Erlang Workshop 2015, ICFP
Slide 2
Slide 2 text
Background
Slide 3
Slide 3 text
• Resolving concurrent modifications
Identify and resolve concurrent operations on
replicated data
• Geo-replication
More concurrency; coordination even less viable
• Semantic resolution
Resolution by “user”; not intuitive
Dynamo (SOSP ‘07)
• SyncFree (FP7)
Large scale, synchronization free, computation.
• Academic Partners
Inria, Koç Üniversitesi, Universidade Nova de
Lisboa, TU Kaiserslautern, Université catholique de
Louvain
• Industry Partners
Basho Technologies, Trifork, Rovio Entertainment,
Erlang Solutions
Atomicity
• Goal
How can we guarantee changes to independent
objects appear atomically?
• Composition (Brown et al., PaPEC ’14)
Riak DT’s composable map: arbitrary* composition
of data types
• Transactions (Antidote, SwiftCloud Middleware ’15)
Weak transactions providing causal consistency
Slide 15
Slide 15 text
Invariant Preservation
• Goal
How can we enforce global system invariants?
• Explicit Consistency (Balegas et al., EuroSys ’15)
Application-specific invariants maintained through
violation-avoidance or invariant-repair
• RPB (Najafzadeh et al., DCC ’13)
Extension to red/blue consistency for transactions
that can be executed with “reservations”
Slide 16
Slide 16 text
Computation
• Goal
How can we write computations with CRDTs that
result in correct programs?
• Lasp (Meiklejohn et al., PPDP ’15)
Dataflow programming model that uses CRDTs as
the primary data abstraction
• C-CRDTs (Navalho et al., PaPoC ’15)
Computational CRDTs that “compute” results as
part of their merge functions
Slide 17
Slide 17 text
Optimization
• Goal
How can we reduce the state we need to ship and
perform metadata reduction?
• PO-Log (Baquero et al., DAIS ’14)
Partially ordered log of operations disseminated
through tagged reliable broadcast
• Delta-State CRDTs (Almeida et al., PaPEC ’14)
State reduction techniques for using state-based
CRDTs
Slide 18
Slide 18 text
Verification
• Goal
How can we verify the correctness of CRDTs?
• Specification of CRDTs (Zeller et al., IFIP ’14)
Isabelle/HOL specification of CRDTs from the
original Inria report
• Specification of applications
Specifications of industry use cases using TLA+
Slide 19
Slide 19 text
Evaluation
• Goal
How can we evaluate this at scale?
• Use case selection
Identify industrial partners that can provide realistic
use cases (virtual wallet, advertisement counter)
• Evaluate at scale
Using reproducible workloads, run experiments at
scale with customers who have deployed Basho’s
Riak
Slide 20
Slide 20 text
Experience
Slide 21
Slide 21 text
Erlang
• Why Erlang?
Existing deployments of databases in Erlang
through Basho’s customer base using Riak
• Goal of modularity
Plug in different modules, share code between Riak
and Antidote
• In practice, this doesn’t work
Riak is very complicated, with lots of performance
optimizations
Slide 22
Slide 22 text
Antidote Experience
• Great for prototyping
Distributed Erlang is a huge benefit to prototyping
distributed applications
• Hard to find experienced developers
Difficult to find developers with either Erlang or FP
experience
• Difficulty with cross platform deployment
Unable to repurpose code for testing in other
settings
Slide 23
Slide 23 text
Lasp Experience
• Similar to Antidote
Same experience with Distributed Erlang and cross
platform deployment
• Types and Typeclasses
Implementation would be cleaner; lots of manual
type checking by carrying around both type and
value.