Differential Synchronization
Google TechTalks3 HN recommenders · recommended in 3 months, 2012–2020
talk · intermediate · evergreen · 2012–2020 on HN
Neil Fraser of Google presents Differential Synchronization, the algorithm behind MobWrite, for keeping multiple copies of a document in sync in real time. The talk argues the approach is robust, convergent and efficient.
HN points to it as a simple diff-and-patch alternative to operational transforms and CRDTs for collaborative editing.
Up next
5 mo on HNThe End of Suburbia - 52 minute documentary on peak oil
endofsuburbia
3 HN recommender · 2011–2021
1 mo on HNReactiveConf 2017 - Tom Dale: Secrets of the Glimmer VM
ReactiveConf
1 HN recommend · 2018–2019
14 mo on HNThe Soul of Erlang and Elixir • Sasa Juric • GOTO 2019
GOTO Conferences
16 HN recommender · 2019–2024
11 mo on HN"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson
Strange Loop Conference
12 HN recommender · 2014–2024
10 mo on HNErlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp
Erlang Solutions
6 HN recommender · 2014–2022
9 mo on HN"Turning the database inside out with Apache Samza" by Martin Kleppmann
Strange Loop Conference
9 HN recommender · 2015–2025
9 mo on HNThe Language of the System - Rich Hickey
ClojureTV
10 HN recommender · 2013–2025
9 mo on HNGoogle I/O 2012 - Go Concurrency Patterns
Google for Developers
9 HN recommender · 2012–2025
7 mo on HNConflict Resolution for Eventual Consistency • Martin Kleppmann • GOTO 2016
GOTO Conferences
3 HN recommender · 2017–2020
7 mo on HN"Unison: a new distributed programming language" by Paul Chiusano
Strange Loop Conference
7 HN recommender · 2020–2023
6 mo on HNPaxos lecture (Raft user study)
Diego Ongaro
6 HN recommender · 2013–2024
5 mo on HNHewitt, Meijer and Szyperski: The Actor Model (everything you wanted to know...)
jasonofthel33t
5 HN recommender · 2015–2025
4 comments from Hacker News
I'm working on a project with some offline data synchronization needs, but haven't started implementation yet. I've been following CRDTs with interest. I also saw many of the same downsides mentioned in the OP, e.g. bloat (which apparently are being addressed remarkably well). Beyond OT, another approach I've run across that looks very promising is Differential Synchronization[1] by Neil Fraser. While it also relies on a centralized server, it allows for servers to be chained in such a way that seems to address many of the downsides of OT. I wonder why I rarely ever see Differential Synchronization mentioned here on HN? Is it due to lack of awareness or because of use-case fit issues or some fatal flaw I haven't seen? Or something else? [1] ▶ this video
I've not tried it, but you might also be interested in an approach called differential synchronization[1]. Basically, it's just a specific way of passing diffs around to guarantee convergence, though (as far as I can tell) it doesn't guarantee much else (as in do you lose data if a patch can't be applied?). The really nice bits, though, are that it is a simple algorithm and that it can be applied to anything that you have diff/patch algorithms for. [1] ▶ this video
One real-world use case is differential synchronization. Here's a Google Tech Talk on the subject: ▶ this video This is for real-time collaborative editing or replication of structured data (unlike Operational Transformation, which is optimized for text). Sending patches back and forth is at the core of the protocol.
Differential synchronization does not require a fixed polling interval. You can have real time updates as each party types, in fact the algorithm prefers this setup as it is easier to process a lot of small changes rapidly. Neil goes into further detail in this google talk about why this is the case: ▶ this video . The trick is sync after someone changes the document while including a short debounce so that you aren't overloading the system with superfluous edits.