A number of years back, I wrote an OT implementation in Clojure/ClojureScript as a hobby project [1] and learned a lot along the way. I even extracting out the core client/server implementations to their own package [2].<p>It's an incredibly fun topic, and one that's also really challenging. It also gave me first-hand experience with fuzz-testing where I could simulate all kinds of concurrent-edit conflicts and ensure both clients came out with the same end-result. While the end client/server implementations are working, it was a lot more effort than I anticipated building a full-fledged editor on top. I was too stubborn at the time to attempt to integrate with existing RTEs though, so the most notable part of the project was the core lib, not the end product.<p>For those interested in implementing it for themselves, I can't recommend this piece [3] by @djspiewak enough.<p>[1] <a href="https://github.com/jahfer/ot" rel="nofollow">https://github.com/jahfer/ot</a>
[2] <a href="https://github.com/jahfer/othello" rel="nofollow">https://github.com/jahfer/othello</a>
[3] <a href="http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation" rel="nofollow">http://www.codecommit.com/blog/java/understanding-and-applyi...</a>
I found this recent paper highly enlightening: <i>“Real Differences between OT and CRDT for Co-Editors”</i>–
Chengzheng Sun, David Sun, Agustina, Weiwei Cai, October 2018.<p>Arxiv meta: <a href="https://arxiv.org/abs/1810.02137" rel="nofollow">https://arxiv.org/abs/1810.02137</a><p>PDF: <a href="https://arxiv.org/pdf/1810.02137.pdf" rel="nofollow">https://arxiv.org/pdf/1810.02137.pdf</a><p>It’s well written imo. The conclusions chapter is very good.<p>“In this work, we have critically reviewed and evaluated representative OT and CRDT solutions, with respect to correctness, time and space complexity, simplicity, applicability in real world co- editors, and suitability in peer-to-peer co-editing. The evidences and evaluation results from this work disprove superiority claims made by CRDT over OT on all accounts.”<p>And it is also argued that OT is a more direct approach to the fundamental issues of realtime multiuser editing, and that that directness brings effectiveness.<p>HN discussion: <a href="https://news.ycombinator.com/item?id=18191867" rel="nofollow">https://news.ycombinator.com/item?id=18191867</a>
Surprised the author didn't mention Quill.js, which works really well with ShareDB, and is fully open source. We've been doing a lot of fun stuff with it - here's a talk I gave recently as a job talk: <a href="https://www.youtube.com/watch?v=gN37rJRmISQ" rel="nofollow">https://www.youtube.com/watch?v=gN37rJRmISQ</a>. (It worked, I got hired :)). As a side project, I'm working on a ShareDB backed wiki, where we can use rich text for editing pages, but also other components, like spreadsheets or mindmaps, and everything supports live editing - I think it would be amazing for classrooms, hackathons, any kind of meeting etc. Would love to talk with anyone interested in collaborating. I have been waiting for a few features to complete to make a proper demo video, but this early one shows off some of the ideas: <a href="https://www.youtube.com/watch?v=9-lU-in3ydc" rel="nofollow">https://www.youtube.com/watch?v=9-lU-in3ydc</a> (<a href="https://github.com/chili-epfl/FROG" rel="nofollow">https://github.com/chili-epfl/FROG</a>)
What many people not fully grasp, at first sight, is that offline support for a collaborative editor is at least an order of magnitude more complex than just building a collaborative editor. In online collaborative environments, solving conflicts is relatively simple, as the changes are supposed to be small. But when two (or more) people are working on the same document without synching it for hours or days, the merge strategy has to be extremely good to come up with anything remotely intended (assuming the authors had a common intention).<p>So just because your favorite editor can be used offline and it has an (online) collaboration feature, does not mean it is capable of being an offline-capable collaborative editor.
Indeed, the space is growing quickly. I run a company that provides a backend for real-time collaboration, so we necessarily stay on top of what's out there. There's a reason the server-side tech tends be paid: it is extraordinarily difficult to provide guaranteed eventual consistency of data at low latency. The CKEditor guys (and us, for that matter) have put YEARS of development effort into their solutions.<p>We're working on both offline mode and a generic rich-text data model with support for the major editors.<p>If anyone's interested, I'd happily do some Q and A here.
I love your description of "the dive". I am happy to see I am not the only one experiencing these recurring devouring interests that bring me much much deeper than I would like to go until I am starting to fork a github repo at 2am wondering "what the hell am I doing?"<p>And that article is tangentially related to a recurring interest of mine (shared editable 3d universe in which you can code collaboratively). If you happened to have an article comparing the merit of several server architectures/algorithms for collaborative text edition, I think many things can be related. I am now reading about CRDT (What the hell am I doing?) and that's something I may use to edit a scene graph collaboratively!
I would be very appreciative if Google made a stripped down version of Google Docs for plaintext editing.<p>There are a bunch of basic integration features that would also be fantastic, but if the product was literally just Google Docs, minus the WYSIWYG bits, and all plaintext w/ maybe some syntax highlighting thrown in, I'd be super happy.
We went with CKEditor5 with a commonmark backend and I cannot recommend it more highly. commonmark data is converted upon initially opening and when closing the editor, allowing all native functionality to happen efficiently.<p>However I do note that we do not yet have a production ready backend for collaborative editing. I would suggest to use their service if possible, since we're developing an open source product it would not be an option for us.<p>There is a quite leaning curve when implementing new plugins due to the strict separation of model and data (commonmark in our case) and user-facing views.
I was able to get real-time collaborative text editing to work on one of my side projects by combining quill.js[1], ot.js[2], and firebase[3]. This was a few years ago when there weren't any fully open-source options. I'm in the process of switching out firebase for an elixir/phoenix backend[4]. I'm really glad for this article because it captures the exact feelings that I have.<p>[1] <a href="https://quilljs.com/" rel="nofollow">https://quilljs.com/</a>
[2] <a href="https://github.com/Operational-Transformation/ot.js/" rel="nofollow">https://github.com/Operational-Transformation/ot.js/</a>
[3] <a href="https://firebase.google.com/" rel="nofollow">https://firebase.google.com/</a>
[4] <a href="https://github.com/phoenixframework/phoenix" rel="nofollow">https://github.com/phoenixframework/phoenix</a>
This was one of the project idea I made myself work on during this April. The motivation being, "how hard is it to make a real-time code editor". Long story short, it is far more complicated than I had imagine and to complete in less than a week. Implementing the CRDT itself, the logic itself is challenging and than putting it down to code is another story.<p>From my understanding, an implementation of logoot[1] is built to create the skeleton of a collaborative environment. From there on, you have the building block to make other things work with it, such as collaborative canvas.<p>I built one using Socket.io on Angular and used Ace Editor own implementation of CRDT<p>> <a href="https://github.com/abdusamed91/realtime-codeeditor" rel="nofollow">https://github.com/abdusamed91/realtime-codeeditor</a><p>I used the following references to build it<p>1) <a href="https://alligator.io/angular/socket-io/" rel="nofollow">https://alligator.io/angular/socket-io/</a><p>2) <a href="https://medium.com/@ofir3322/create-an-online-ide-with-angular-6-nodejs-part-1-163a939a7929" rel="nofollow">https://medium.com/@ofir3322/create-an-online-ide-with-angul...</a><p>To get started with the theory CRDT low level algorithm, these two post go into great details<p>1) <a href="https://conclave-team.github.io/conclave-site/" rel="nofollow">https://conclave-team.github.io/conclave-site/</a><p>2) <a href="http://digitalfreepen.com/2017/10/06/simple-real-time-" rel="nofollow">http://digitalfreepen.com/2017/10/06/simple-real-time-</a>
collaborative-text-editor.html<p>[1]<a href="https://hal.inria.fr/inria-00432368/document" rel="nofollow">https://hal.inria.fr/inria-00432368/document</a><p>I'd love to take it to another level if anyone here has mutual interest in this field of work.
I wonder why would one make a headline "Open source collaborative text editors", and then write about online editors which are neither fully open-sourced, nor fully collaborative. And then stop with them, without even mentioning solutions that are both truly real-time collaborative and truly open source.
You should try <a href="https://www.fiduswriter.org" rel="nofollow">https://www.fiduswriter.org</a>. It does have realtime collaboration, export to ODT/DOCX/Epub/LaTeX, tracked changes, WYSIWYG interface, etc. and in the latest version even a document template editor. I think relatively speaking it's quite developed in comparison to some of the other word processors presented here. It does include both frontend and backend parts to make collaboration work. (I did a lot of the programming over the past 7 years.)
This article from the NYT tech blog is a really good read on how they created a custom text editor for the newsroom: <a href="https://open.nytimes.com/building-a-text-editor-for-a-digital-first-newsroom-f1cb8367fc21" rel="nofollow">https://open.nytimes.com/building-a-text-editor-for-a-digita...</a><p>They built their custom app with the open source ProseMirror (<a href="http://prosemirror.net/" rel="nofollow">http://prosemirror.net/</a>) toolkit.
So, lots of open-source UIs that use closed-source servers for collaborative editing?<p>This figures. This is one of the ways 'open source' companies can make money.<p>So, the author sets about making an open-source collaboration server that inter-operates with the existing open-source editor?<p>Kudos!<p>But now the company can retaliate by adding features or inconsistencies to the closed source server and its integration into the UI, making the open-source server forever out-of-date and playing catch-up.<p>Ouch.
Another one missing: <a href="https://en.wikipedia.org/wiki/SubEthaEdit" rel="nofollow">https://en.wikipedia.org/wiki/SubEthaEdit</a><p><i>SubEthaEdit is a collaborative real-time editor designed for Mac OS X. The name comes from the Sub-Etha communication network in The Hitchhiker's Guide to the Galaxy series.</i><p>From 2003.
Etherpad (etherpad lite) has plugins for formatting <a href="https://static.etherpad.org/plugins.html" rel="nofollow">https://static.etherpad.org/plugins.html</a><p>You can try a lot of them out in the demo online <a href="https://etherpad.org/" rel="nofollow">https://etherpad.org/</a>
One neat thing about live collaboration is that every single edit is stored. This enables some nice things, like seamless replay of the entire document editing history. We've been working for a while on trying to analyze edit histories, to see if we could predict which stage of editing a document is in, which writing strategy users use, how a small team is collaborating etc. (Main purpose is to support teachers using this with student groups). We have some code here that works with Etherpad and ShareDB (<a href="https://github.com/chili-epfl/FROG-analytics" rel="nofollow">https://github.com/chili-epfl/FROG-analytics</a>), and happy to share preprints with anyone interested.
<a href="https://github.com/psybernetics/synchrony" rel="nofollow">https://github.com/psybernetics/synchrony</a> does realtime collaborative WYSIWYG hyperdocument editing.<p>Imagine if Google Wave had a friends list similar to Telegram and each peer acted as a public cache for dead hypermedia.
I’m new to the topic from a technical point of view. I was wondering if the conflict resolving issues are fundamentally different from online gaming scenarios. I.e., could the ways problems are solved in multiplayer games also be applied to collaborative editors and vice versa?
Another one for the list:<p><a href="https://github.com/ipfs-shipyard/peer-pad" rel="nofollow">https://github.com/ipfs-shipyard/peer-pad</a><p>Demo here:<p><a href="http://dev.peerpad.net/" rel="nofollow">http://dev.peerpad.net/</a><p>(this version will launch soon as soon as we complete the “pinning” / backup link to ipfs-cluster and make some UI tweaks)<p>Built with:<p><a href="https://github.com/peer-base/peer-base" rel="nofollow">https://github.com/peer-base/peer-base</a>
Since it didn't make the list, nor has been mentioned in this thread, I want to recommend <a href="https://firepad.io/" rel="nofollow">https://firepad.io/</a> - we use it quite heavily at our company. It's uses Firebase behind the scenes so is essentially 'serverless' and we use it for editing our e-mail newsletters live as a team. It literally takes minutes to throw into an app.
Until last year and for two years I kept an Etherpad Lite to do shared text editing and it was amazing. It was in use for three years. The only reason I stopped using it was Google Docs, who bought the company or IP for Etherpad, can do the same thing and therefore I don't have to do the Linux maintenance. I even had it use SQlite as the database and it could handle as many as 30 simultaneous users without a hitch.
Mediawiki's visual editor has a (unreleased) collaborative mode: <a href="https://www.mediawiki.org/wiki/VisualEditor/Real-time_collaboration" rel="nofollow">https://www.mediawiki.org/wiki/VisualEditor/Real-time_collab...</a><p>Hits all those open-source client and server notes, and has the advantage of supporting everything that mediawiki does.
We (at brainioapp.com) are right now working on collaborative mind map app that works like notes that you can convert (based on mark-down) to mind map. It's like a combination of Evernote and XMind. Video here: <a href="https://youtu.be/nJjFs7GmIBQ" rel="nofollow">https://youtu.be/nJjFs7GmIBQ</a>.
Can't see any link to collaborative demos for CKEditor 5 in the article but here it is: <a href="https://ckeditor.com/collaboration/real-time-collaborative-editing/demo/" rel="nofollow">https://ckeditor.com/collaboration/real-time-collaborative-e...</a>
VSCode is collaborative and Open Source. You install a plugin and send someone a link - you are then hacking on their document, in your VScode on your keyboard with your plugins installed.<p>Sorry I can't remember what the plugin is called, I used it every day at my last contract though. Made pairing super easy.
I'm curious about the choice of PubSweet for the collaboration components. Can you summarise what functions PubSweet is performing in your example app, and are there alternatives to PubSweet that you looked at for this functionality?
Some colleagues at work started to use <a href="https://hackmd.io/" rel="nofollow">https://hackmd.io/</a> for collaborative editing of markdown text. It works great.
A CKEditor 5 team member here. Thanks a lot for such an in-depth analysis, the article is a great read and we truly appreciate being a contender there.<p>As for the existing implementations of CKEditor 5 with real-time collaboration, I'm afraid since the collaborative editor is usually a component of a larger platform (publishing, e-learning, CMS, intranet, documentation management system etc.) it'd be difficult to find something like a publicly available real-life use case demo of it. Without much effort, you can check out the real-time collaborative editing demos (<a href="https://ckeditor.com/collaboration/real-time-collaborative-editing/demo/?active-demo=collaboration" rel="nofollow">https://ckeditor.com/collaboration/real-time-collaborative-e...</a>) that we have on our website.<p>A while ago we started building our own internal implementation of a collaborative document management system using CKEditor 5 and features such as real-time collaboration with track changes (something like Google Docs) for our own needs - hopefully, once we polish it a bit, we will be able to release it. We are working on publishing a few case studies with existing customers, too.<p>As for offline collaboration, our current solution switches the editor to read-only when you e.g. lose connectivity, and then the editing mode is back on when you reconnect, along with the changes that were done in the meantime by other users when you were offline. The platform is ready to fully support "offline" writing. We tested some more complex scenarios with one of the users being offline - and it works (however, no periods as long as days of being offline). We focused on delivering other collaborative editing features such as track changes or comments that were more required by our customers. Full support for writing while being offline is still on our roadmap, though.<p>As for the answer to why the collaboration component is not Open Source: we have currently 40 people in total working on CKEditor (CKEditor 4 & CKEditor 5). Developing such a complex application takes a lot of time and resources and we simply need money to cover the expenses. Without that, we’d not be able to spend so much time on fixing bugs or bringing new features. Also, unfortunately, we learned the hard way that some of the biggest IT companies don’t want to help Open Source projects by spending even a single dollar on them, even if they use it in an application that brings them millions of dollars.<p>Regarding mobile support: CKEditor 5 works well on mobiles (with and without real-time collaboration). The comment you referred to was about the lack of an online demo of real-time collaboration on ckeditor.com for mobile devices. The reason behind this decision was that we are using the sidebar for displaying comments, which results in rather poor UX on mobiles. Fortunately, we are almost finishing the inline annotations plugin which will display comments inline, without using the sidebar. Feel free to assign a full Kiwi for mobile support :)<p>Thanks again for the article!
For anyone who wants a quick primer on OT / CRDT text algorithms:<p><a href="https://gun.eco/explainers/school/class.html" rel="nofollow">https://gun.eco/explainers/school/class.html</a> ( Cartoon Explainer! )<p>For a detailed deep dive, including RGA:<p><a href="https://www.youtube.com/watch?v=yCcWpzY8dIA" rel="nofollow">https://www.youtube.com/watch?v=yCcWpzY8dIA</a>