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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Creating a Collaborative Editor

80 点作者 phedkvist将近 6 年前

6 条评论

kba将近 6 年前
That&#x27;s an interesting project and good writeup!<p>Peer-to-peer OT has indeed been proven wrong many times (I&#x27;ve debunked a few papers myself as well), but client-server-based OT is very solid.<p>For the last 3 years, I&#x27;ve been the primary developer on Webstrates[1], an open source[2] research project that &quot;makes the DOM collaborative&quot;, that is to say, as Google Docs (and your project) makes text editing collaborative (a subset of the DOM), Webstrate aims to make the entire DOM collaborative, allowing developers to easily built collaborative tools (such as text editors).<p>In fact, I just made a basic editor here (<a href="https:&#x2F;&#x2F;demo.webstrates.net&#x2F;dom-editor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;demo.webstrates.net&#x2F;dom-editor&#x2F;</a>) in about 5 seconds. I just created a new webstrate (a &quot;page&quot; on the server) and added the `contenteditable` attribute to the body element. Of course, it dosen&#x27;t have any of the rich text editing capabilities of your editor, but that&#x27;s just a matter of adding more stuff directly in the DOM, e.g. <a href="https:&#x2F;&#x2F;demo.webstrates.net&#x2F;shaggy-elephant-60&#x2F;?copy" rel="nofollow">https:&#x2F;&#x2F;demo.webstrates.net&#x2F;shaggy-elephant-60&#x2F;?copy</a>.<p>Through those 3 years, there haven&#x27;t been any DOM consistency errors caused by issues with the OT algorithm used.<p>Absolutely nothing wrong with CRDT – it&#x27;s even on our own agenda to eventually develop a peer-to-peer-basd Webstrates using CRDT. I just wanted to point out that OT is a very viable alternative for client-server applications.<p>[1] <a href="https:&#x2F;&#x2F;webstrates.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webstrates.net&#x2F;</a>, [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;Webstrates&#x2F;Webstrates" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Webstrates&#x2F;Webstrates</a>
scofalik将近 6 年前
&gt; Operational Transformation (OT) is one of those algorithms, which have been evolving over time, as versions of it have been proven incorrect.<p>Source or explanation required.<p>Also, this: <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1905.01302" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1905.01302</a><p>I guess that you can argue for both sides :). But they are just different solutions. Basing on my experience and on what I read it is simply unfair saying that one is incorrect and other is correct (or one is better and the other is worse).
评论 #20183847 未加载
评论 #20181974 未加载
评论 #20182144 未加载
zellyn将近 6 年前
If you&#x27;re interested in this subject, definitely make sure you check out the xi-editor retrospective: <a href="https:&#x2F;&#x2F;github.com&#x2F;xi-editor&#x2F;xi-editor&#x2F;issues&#x2F;1187#issuecomment-491473599" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xi-editor&#x2F;xi-editor&#x2F;issues&#x2F;1187#issuecomm...</a>
xuejie将近 6 年前
I&#x27;m confused here, Quill has a a very nice OT solution built-in to solve collaborative issue: <a href="https:&#x2F;&#x2F;github.com&#x2F;quilljs&#x2F;delta" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;quilljs&#x2F;delta</a><p>Why not leverage that solution than just saying OT is <i>incorrect</i> and roll out a rudimentary solution? CRDT is not something easier, OT and CRDT are just 2 different beasts with different trade-offs.
评论 #20181479 未加载
darkbatman将近 6 年前
I took a different approach btw building collaborative editing in WordPress core editor. Knowing about OT&#x2F;CRDT but decided to go with the approach here: <a href="https:&#x2F;&#x2F;github.com&#x2F;WordPress&#x2F;gutenberg&#x2F;pull&#x2F;1877" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WordPress&#x2F;gutenberg&#x2F;pull&#x2F;1877</a><p>Might be useful to you as this is react&#x2F;redux.
cyborgx7将近 6 年前
My Bachelor Thesis was implementing an operational transformation algorithm for tree structures (JSON objects) and evaluate it. Always thought about going back to it and build it into a usable application.
评论 #20183058 未加载
评论 #20182139 未加载