TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lessons learned from creating a real-time collaborative rich-text editor

426 pointsby Reinmarover 6 years ago

24 comments

codetrotterover 6 years ago
&gt; We were quite seriously scared of repeating the infamous history of Netscape which was a well-known example of failing to successfully release a newer version of a popular software after deciding to rewrite it from scratch. Fortunately it did not happen in our case.<p>Big kudos for pulling it off!<p>&gt; Two main candidates are Operational Transformation (OT) and Conflict-Free Replicated Data Type (CRDT). We chose OT and perhaps one day we will write down our thoughts on the ongoing OT vs. CRDT battle.<p>Please do, I would love to hear your thoughts on OT vs CRDT!
评论 #18232122 未加载
评论 #18232648 未加载
评论 #18231075 未加载
评论 #18239877 未加载
fabricexpertover 6 years ago
&gt; The number of tests: 12500<p>&gt; Code coverage: 100%<p>&gt; Development team: 25+<p>&gt; Estimated number of man-days: 42 man-years (until September 2018), including time spent on writing tools to support the project like mgit and Umberto (the documentation generator used to build the project documentation)<p>Software is expensive
评论 #18233923 未加载
评论 #18233332 未加载
评论 #18236213 未加载
pg_botover 6 years ago
For anyone interested in this issue I would suggest taking a look a Neil Fraser&#x27;s Differential Synchronization.[0] It took me 2 weeks as a solo developer to add real time collaborative editing to our product using that method.<p>[0]: <a href="https:&#x2F;&#x2F;neil.fraser.name&#x2F;writing&#x2F;sync&#x2F;" rel="nofollow">https:&#x2F;&#x2F;neil.fraser.name&#x2F;writing&#x2F;sync&#x2F;</a>
评论 #18231956 未加载
评论 #18231597 未加载
wpietriover 6 years ago
Nice article. This is a great example of how Domain-Driven Design pays off. By really paying attention to how users think of the problem and expressing that in their design, they ended up with a richer domain model which in turn let them get better code <i>and</i> a better user experience.
评论 #18232372 未加载
pier25over 6 years ago
It says on the pricing page that CKEditor 5 has &quot;GPL 2+ copyleft Open Source&quot; license. Can someone ELI5 that?<p><a href="https:&#x2F;&#x2F;ckeditor.com&#x2F;ckeditor-5&#x2F;pricing&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ckeditor.com&#x2F;ckeditor-5&#x2F;pricing&#x2F;</a>
评论 #18231209 未加载
评论 #18231149 未加载
marijnover 6 years ago
Nice! I too, would love to read more on the OT&#x2F;CRDT trade-off.<p>Companion reading (the approach taken in ProseMirror, which was implemented in significantly less person-years): <a href="http:&#x2F;&#x2F;marijnhaverbeke.nl&#x2F;blog&#x2F;collaborative-editing.html" rel="nofollow">http:&#x2F;&#x2F;marijnhaverbeke.nl&#x2F;blog&#x2F;collaborative-editing.html</a>
fovcover 6 years ago
Do you ever garbage collect the graveyard? I wrote a tree based OT (slightly different domain) and never found a great solution for that.
评论 #18232341 未加载
zawerfover 6 years ago
Is there a sharedb compatible OT type definition? Like how <a href="https:&#x2F;&#x2F;github.com&#x2F;ottypes&#x2F;rich-text" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ottypes&#x2F;rich-text</a> exists for Quill? <a href="https:&#x2F;&#x2F;quilljs.com&#x2F;docs&#x2F;delta&#x2F;" rel="nofollow">https:&#x2F;&#x2F;quilljs.com&#x2F;docs&#x2F;delta&#x2F;</a><p>Also is it possible for third party plugins to add new operations (defining their own conflict resolution against the existing types)?
评论 #18232475 未加载
tomcamover 6 years ago
Amazingly good illustrations. Whoever did that should illustrate all the books.
评论 #18231750 未加载
stevetoddover 6 years ago
Been searching for a bit and it appears that the real-time collaboration part isn&#x27;t open source and requires you to use their cloud service to make it work. The pricing for that isn&#x27;t available on their website and instead requires you to contact them.<p>I hope I&#x27;m wrong since I have some ideas I&#x27;d like to try it out with. Sending my customer&#x27;s data to their cloud is probably a non-starter.
评论 #18233523 未加载
whittenover 6 years ago
Is there any difference in editing a structured document which is intended to ultimately be text for presentation and reading, versus a structured document which is describing requirements for code or a storyboard for a design? Do these different end-results change the collaborative environment?
评论 #18230968 未加载
galaxyLogicover 6 years ago
What is the main use-case for this? I&#x27;m looking at it from a coder&#x27;s perspective. When I&#x27;m writing some code I wouldn&#x27;t want somebody else inserting characters into my code while I am editing it.<p>But I can see that if the app is divided into a multiple code-files then different coders can be working on different files at the same time. Still I prefer some form of code ownership or at least locking of multiple files just for me while I&#x27;m working on them.<p>I don&#x27;t quite see how it would be much different for other kinds of text. While I&#x27;m writing this post right now I wouldn&#x27;t want somebody else modifying its beginning while I&#x27;m writing its end.<p>Not saying there aren&#x27;t any good use-cases, just can&#x27;t think of any right now. So that&#x27;s my question, what are they?
评论 #18234476 未加载
badestrandover 6 years ago
I can imagine real-time collaboration is an immensely interesting problem to work on.<p>Also wonderful blog post, actually read it in full, thanks!
评论 #18232386 未加载
评论 #18231801 未加载
hardwaresoftonover 6 years ago
Recently saw a fantastic intermediate talk on this subject called CRDTs and the Quest for Distributed Consistency[0]. One product of the research was automerge[1], a library for handling collaborative editing of JSON-like data models<p>[0]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=B5NULPSiOGw" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=B5NULPSiOGw</a><p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;automerge&#x2F;automerge" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;automerge&#x2F;automerge</a>
dbcurtisover 6 years ago
This is a great blog post.<p>It was interesting to see how they approached moving from a linear data model to a tree structured data model. Is anyone aware of similar work with graph structured data, as you find in electronic design automation? Think collaborative schematic editing.
cjblomqvistover 6 years ago
Nice writeup! A tiny nitpick, shareJS (DerbyJS) had&#x2F;have an object based OT implementation (ie. tree) since before this was started I think (or around the same time).
评论 #18232802 未加载
ameliusover 6 years ago
&gt; We started building our next generation rich-text editor with the assumption that real-time collaborative editing must be the core feature that lies at its very foundation<p>Am I the only one who doesn&#x27;t like other people typing through my work? Why not simply let the user choose when to merge their work with others?<p>Honestly, sometimes I feel collaborative text editors have been created &quot;just because we can&quot; or &quot;just because we want to see if we can&quot;.
评论 #18232655 未加载
评论 #18231995 未加载
ianstormtaylorover 6 years ago
How do you keep track of the nodes in the &quot;graveyard&quot;? Does that mean that each node has to have some sort of UUID across clients?
评论 #18233494 未加载
codetrotterover 6 years ago
The link at the bottom which said that you could check out a demo was confusing because there was no demo there.<p>Demo can be found at <a href="https:&#x2F;&#x2F;ckeditor.com&#x2F;docs&#x2F;ckeditor5&#x2F;latest&#x2F;features&#x2F;collaboration&#x2F;overview.html" rel="nofollow">https:&#x2F;&#x2F;ckeditor.com&#x2F;docs&#x2F;ckeditor5&#x2F;latest&#x2F;features&#x2F;collabor...</a>
评论 #18232301 未加载
Tade0over 6 years ago
Nice write-up. I&#x27;ve seen[0] the blood, sweat and tears that went into this project and I have to say it has come a long way.<p>BTW any timeline on sunsetting the venerable CKEditor 4?<p>[0] I was part of the CKEditor 4 team back when the CKE5 guys were laying down some the first iterations of what is described in this blog post.
评论 #18233057 未加载
js4everover 6 years ago
This is a disguised ad for their saas offer. Seems interesting but no public pricing. Meaning it&#x27;s probably very expensive and targeting big customers.
shyamalaover 6 years ago
It is clear that Google Docs is using OT.Curious to know what Office365 is using for its real-time collaboration.
stuaxoover 6 years ago
This is pretty interesting, would like to apply it to other kinds of editor.<p>These abstractions should be in the OS really.
bawanaover 6 years ago
I dont understand why this is so hard. If you take a document and enter each character into a database as a separate entry, then only lock each character as it&#x27;s changed and unlock it immediately afterwards. The likelihood that all individuals will be modifying the same character at the same time is low. and while it&#x27;s locked, the person trying to change it will see it&#x27;s not changing - so they&#x27;ll try again in a second or two by which time it will be unlocked.
评论 #18232187 未加载
评论 #18231777 未加载
评论 #18232007 未加载