w00h00, this is my area of expertise.<p>After 8 years of working on this, I have changed my thoughts:<p>- The correct algorithm is not always the correct user experience.<p>- End-to-end encryption is too important to not have.<p>- Offline support is great, but it behaving consistently is more important than it behaving "intently".<p>- Biggest pain points can most easily be solved at the editing layer, not data layer.<p>As a result, OT gets thrown out the door immediately.<p>I built the most popular CRDT powered database on the market (<a href="https://github.com/amark/gun" rel="nofollow">https://github.com/amark/gun</a>, 11K+ stars, 11M+ monthly installs), but have some harsh words for CRDT obsessed people:<p>CRDTs are great, but if you create an infinitely complex one to handle "every word editing operation" it'll actually result in an inferior user experience.<p>As such, for example, GUN supports lock-free concurrent operations on any depth of data in a graph, but keeping text/strings behavior atomic is way more important than having built-in automatic string merges.<p>Why? It is much simpler to build a correct text/string CRDT on top of a predictable, stable, graph CRDT that is understandable.<p>Another example is, in our blog editing tools, despite having spent years researching & implementing (+ others in our community) precise character-by-character CRDT resolution schemes, I found I personally had a much better offline & local first user experience with a predictable per-paragraph sync scheme.<p>This is a stupid simple approach, but what it means is that I as a user, can easily predict whats going to happen, so if I'm offline I know I should just copy a new paragraph and fiddle with things there, cause it isn't gonna get "auto delete regrammar merged".<p>Generally speaking, me and colleagues don't "fight" over the same paragraph, we're usually concurrently writing different "sections" at the same time, it is pretty rare to grammar fix their edit same paragraph as they're typing it - that is also just kinda, rude looking.<p>Anyways, finally, is that the majority of text styling and DOM edge cases can be handled by having a deterministic canonical DOM hierarchy that always gets applied at the editing layer, BEFORE any CRDT operations even occur.<p>So for instance, re-arrange the DOM tree such that <i> is always inside <u> inside <b>, or something like that.<p>We built this into a library called normalize, and it instantly eliminated so much complexity, especially at the CRDT level. Ping me if you want a demo of this library.<p>Finally, for everyone else, we also built an <i>INTERACTIVE CARTOON EXPLAINER</i> of an extremely basic text CRDT to help others understand the more detailed concepts:<p><a href="https://gun.eco/explainers/school/class.html" rel="nofollow">https://gun.eco/explainers/school/class.html</a>