TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Scaling Linear's Sync Engine

55 点作者 tommoor将近 2 年前

4 条评论

maccaw将近 2 年前
I have a genuine appreciation for how Linear has built this. We have had to build something similar for our note taking application (Reflect). It is very tricky to do and I wish there was more research on this.<p>In my opinion, what we need is:<p>1) A client-side performant SQLite database that supports live queries. I.e. you can automatically re-render the page when the queries change. That way your database can drive the UI and be the source of truth in regards to what&#x27;s displayed on the screen.<p>2) A separate realtime syncing protocol that syncs database state to client state.<p>And ideally this is all open source, and that these two endeavors are not coupled tightly.<p>[1] Wa-sqlite is the best (imo) client-side db - better than than the official Sqlite WASM build (for now) because it had a indexeddb fallback for browsers that aren&#x27;t the cutting edge Chrome.<p>[2] cr-sqlite is an interesting project using CRDTs to sync state around. However I still believe that for many production use-cases you want a ultimate server source of truth.<p>[3] Replicache is still the best closed source solution I know of.<p>[1] - <a href="https:&#x2F;&#x2F;github.com&#x2F;rhashimoto&#x2F;wa-sqlite">https:&#x2F;&#x2F;github.com&#x2F;rhashimoto&#x2F;wa-sqlite</a> [2] - <a href="https:&#x2F;&#x2F;github.com&#x2F;vlcn-io&#x2F;cr-sqlite">https:&#x2F;&#x2F;github.com&#x2F;vlcn-io&#x2F;cr-sqlite</a> [3] - <a href="https:&#x2F;&#x2F;replicache.dev&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;replicache.dev&#x2F;</a>
评论 #36521902 未加载
评论 #36522601 未加载
评论 #36521913 未加载
mercurialsolo将近 2 年前
Figma has a great post on how they handled multi-player syncing using CRDT&#x27;s. <a href="https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;how-figmas-multiplayer-technology-works&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;how-figmas-multiplayer-technology...</a>
Rapzid将近 2 年前
I think it&#x27;s really cool what they implemented. At least in v1 it was a sort of inverted ORM; it gets pushed object updates and does relation fixup(an Entity Framework term at least) as they arrive. It even looked like they created a decorator based lib with a syntax very close to ORMs so they could define relationships on the FE objects. Also, a huge fan of MobX.<p>But, man it looks like it has gotten really complicated and.. Well I guess this is the sort of thing you get to do as a technical co-founder of a company with traction. That is to say, Linear was just OK to me and none of these sync features seemed to raise it above any other issue tracker I&#x27;ve used. With the added downside that loading the workspace from the pub via the webapp could be excruciatingly slow.
notamy将近 2 年前
Heads-up: This is a video (<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Wo2m3jaJixU">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Wo2m3jaJixU</a>) embedded in a blog post; there doesn&#x27;t seem to be an accompanying text-only version.