Scaling the Linear Sync Engine
Linear2 HN recommenders · recommended in 2 months, 2023-2025
37K views · 3 years ago · talk · evergreen
A Linear engineer talks about scaling the company's sync engine, which keeps client data local and synchronized. It follows an earlier talk on the same system.
Recommended whenever local-first software, sync engines and CRDT alternatives come up, as a practical production account.
1:16:07React Helsinki February 2020
Fraktio
42K views • 6 years ago
19:36Your web app but good: Aaron Boodman (Local-First Conf)
Local-First Conf
8K views • 2 years ago
29:46The past, present, and future of local-first - Martin Kleppmann (Local-First Conf)
Local-First Conf
17K views • 2 years ago
54:44Differential Synchronization
Google TechTalks
52K views • 17 years ago
1:08:17How We've Scaled Dropbox
Stanford
372K views • 14 years ago
1:10:23"Systems that run forever self-heal and scale" by Joe Armstrong (2013)
Strange Loop Conference
85K views • 5 years ago
52:23Nicholas Zakas: Scalable JavaScript Application Architecture
YUI Library
68K views • 15 years ago
38:43Scalability at YouTube
Next Day Video
51K views • 14 years ago
41:06"Unison: a new distributed programming language" by Paul Chiusano
Strange Loop Conference
45K views • 7 years ago
46:15AWS re:Invent 2014 | (SPOT302) Under the Covers of AWS: Its Core Distributed Systems
Amazon Web Services
10K views • 11 years ago
53:14Mastering Chaos - A Netflix Guide to Microservices
InfoQ
2.3M views • 9 years ago
52:41Seattle Conference on Scalability: YouTube Scalability
Google TechTalks
30K views • 19 years ago
49:15Erlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp
Erlang Solutions
50K views • 12 years ago
43:39CRDTs and the Quest for Distributed Consistency
InfoQ
68K views • 8 years ago
51:27Google I/O 2012 - Go Concurrency Patterns
Google for Developers
894K views • 14 years ago
1:22:45Building Software Systems At Google and Lessons Learned
Stanford
257K views • 15 years ago
48:45Matrix 2.0 — How we're making Matrix go voom!
Matrixdotorg
16K views • 3 years ago
35:15Solid Ground // Saša Jurić
EMPEX Conference
14K views • 9 years ago
45:05Servo Architecture: Safety and Performance
linux conf au 2017 - Hobart, Australia
12K views • 9 years ago
1:19:35Lecture 1: Introduction
MIT 6.824: Distributed Systems
921K views • 6 years ago
5 comments from Hacker News
> Previous sync engines really want you to sync all data Linear had to do all sorts of shenanigans to be able to sync all data, for orgs with lots of it – there's a talk on that here: ▶ this video
(this should probably be a post) CRDTs and local first are ideas that is perpetually in the hype cycle for the last decade or so, starting around the time Riak CRDTs became a thing and continuing all the way to today. Niki's post is a perfect illustration: CRDTs offer this "magical" experience that seems perfectly good until you try building a product with them. Then it becomes a nightmare of tradeoffs: - state-based or operation-based? do you trim state? how? - is it truly a CRDT (no conflicts possible), a structure with explicit conflict detection, or last-writer-wins/arbitrary choice in a trench coat that will always lose data? Case in point: Automerge uses pseudo-random conflict resolution, so Niki's solution will drop data if it's added without a direct causal link between the edits. To learn this, you have to go to "under the hood" section in Automerge docs and read about merge rules very attentively. It might be acceptable for a particular use case, but very few people would even read that far! - what is the worst case complexity? Case in point: yjs offers an interface that looks very much like JSON, but "arrays" are actually linked lists underneath, which makes it easy to accidentally become quadratic. - how do you surface conflicts and/or lost data to the user in the interface? What are the user expectations? - how do you add/remove replication nodes? What if they're offline at the time of removal? What if they come online after getting removed? - what's user experie
You may not need CRDT per-se, but building a collaborative experience is so difficult. I worked on collaborative systems for a bit, and also have read a bit about how Figma and Notion do it (this is a good read: link ) -- it's still super hard to get right. This talk by Karri about Linear's "sync engine" is also a good watch: ▶ this video .
This article has been quite the inspiration for many projects and progress on this front. I think we're seeing more and more developments around CRDTs and local-first frameworks / applications. I'm working on a few projects in this area: - link - Notion meets Notebook-style live programming for TypeScript / React - link - a rich text editor built on TipTap / Prosemirror that supports Yjs for local-first collaboration - link - a wrapper around Yjs for easier development In my experience so far, some things get more complicated when building a local-first application, and some things get a lot easier. What gets easier is that once you've modeled and implemented the data-layer (which does require you to rethink / unlearn a few principles), you don't need to worry about data-fetching, errors etc. as much as in a regular "API-based" app. Another interesting video I recommend on this topic is about Linear's "Sync Engine" which employs some of the local-first techniques as well: ▶ this video
Heads-up: This is a video ( ▶ this video ) embedded in a blog post; there doesn't seem to be an accompanying text-only version.