News for hackers. Stuff that matters.
Re:CRDTs are the future by lewisjoe on Monday September 28, 2020 @01:36PM (#24619204)
I'm part of the team that makes Zoho Writer (a Google Docs alternative) - https://writer.zoho.com

We went with OT for our real-time syncing of edits in 2010 and a decade later, we are still sticking with OT for reasons I already stated sometime back - https://news.ycombinator.com/item?id=24186883

However, in the spirit of "There are no solutions, only trade-offs" CRDTs are absolutely necessary for certain type of syncing - like syncing a set of database nodes.

But for systems which already mandate a central server (SaaS/Cloud) and especially for a complex problem like rich-text editing (i.e semantic trees) I still think OT provides better trade-offs than CRDT.

I respect Joseph's conviction on CRDTs being the future, so I guess we'll figure this out sometime soon.

Re:CRDTs are the future by btreecat on Monday September 28, 2020 @03:38PM (#24620437)
My small startup company went with Zoho office at first because of the price. But the features is what has us looking to stay for a while.

One thing I would love to see is the addition of wildcard addresses like the way google has and microsoft added ([email protected]).

Thanks for your hard work on a great product!

Re:CRDTs are the future by aidos on Monday September 28, 2020 @03:50PM (#24620580)
The Zoho ecosystem is this weird place where you can find almost everything, virtually for free. If you’ve never looked before, check it out - it’s expansive.

Frustratingly though, there are so many features heaped in that there is no cohesion. Things are frequently buggy, unreliable and disjointed. I’d almost be able to forgive it but unfortunately the support is really terrible too.

I assessed a lot of crm software and each one I kept finding things they didn’t have that zoho had but for the reasons above we ultimately chose something else. Which is a shame, because I would pay them a lot more than they ask, for them to just be a little better.

Re:CRDTs are the future by steve19 on Monday September 28, 2020 @08:45PM (#24622956)
> Things are frequently buggy, unreliable and disjointed. I’d almost be able to forgive it but unfortunately the support is really terrible too.

This is my experience. After years of paying for the service, for multiple users, using tools that seemed to have been forgotten by the dev team, my credit card failed to process one month.

Support was not interested in helping me. Not at all. Ended up having to move my team's workflow off Zoho. I had been begging them to bill my card, but they just kept sending me generic emails asking me to try again. Phone support was even less helpful.

Re:CRDTs are the future by gala8y on Tuesday September 29, 2020 @04:27AM (#24625301)
Preceding comment like this with OT goes a long way.
Re:CRDTs are the future by Reinmar on Wednesday September 30, 2020 @11:40AM (#24639918)
We went with OT five years ago in CKEditor 5 and we have the same experience. While it would be tempting to try CRDT, it seems to come with too significant tradeoffs in our scenario.

My colleague wrote down our thoughts in https://ckeditor.com/blog/Lessons-learned-from-creating-a-ri....

The other aspect of CRDT that's in some scary is what @mdpye explains in https://news.ycombinator.com/item?id=24621113. With OT, if we get the corner cases right, we can tune and extend the implementation. With CRDT that might be game over.

Re:CRDTs are the future by RangerScience on Monday September 28, 2020 @01:46PM (#24619313)
Interesting. I might be adding real-time edit syncing to a hobby project sometime soon. Can you share more about the trade-offs?
Re:CRDTs are the future by lewisjoe on Monday September 28, 2020 @02:09PM (#24619572)
I haven't yet completely watched Martin's talk on CRDTs, so I might come back and stand corrected. For now these are some well known trade-offs

A central server: Most OT algorithms depend on a central system for intention preservation. CRDTs are truly distributed and need no central server at all.

Memory: Traditionally CRDTs consume more memory because deletions are preserved. OT lets you garbage collect some operations since a central system is already recording those ops and sequencing them as well.

Analysing and cancelling ops: OT lets you easily analyse incoming ops and modify/dummy-ify/cancel them without breaking the consistency. This convenience is not necessary for most cases, but really important for rich-text editing. For example when someone merges a couple of table cells when another user is deleting a column, we need to analyze these operations and modify them so as not to end-up with an invalid table structure.

Re:CRDTs are the future by fulafel on Tuesday September 29, 2020 @12:45AM (#24624218)
For building P2P / decentralized apps, could OT be used with some kind of leader election system?
Re:CRDTs are the future by btilly on Tuesday September 29, 2020 @01:16PM (#24630393)
Absolutely. And as a next step, you distribute your OT per document so that no one of them has too much load. This is exactly how Google docs work and for the most part it works well.

The downside is that if a single document gets a spike of traffic because it goes viral, then that document won't scale.

Re:CRDTs are the future by fulafel on Tuesday September 29, 2020 @02:05PM (#24631029)
Right, bur could one of the clients be elected to the OT leader role without having tje smarts at a backend? I guess it boils down to trusting the integrity of the client.
Re:CRDTs are the future by passthefist on Monday September 28, 2020 @02:25PM (#24619770)
Seems like another one (based off the article) is ease of use as well. I'm not familiar with either algorithm, but sounds like OT is less complex and easier to understand, which IMO is a decent tradeoff worth considering.
Re:CRDTs are the future by mdpye on Monday September 28, 2020 @04:54PM (#24621113)
Having worked a little with both, my impression is that OT can get very complex in implementation edge cases. CRDTs are incredibly difficult to design, but if you successfully design one which can model your features, implementation is pretty straightforward.

A real world implication is that if you want to add a new operation to a system (like, table column merge, or moving a range of text), with OT, you can probably find a way to extend what you have to get it in there, with a painfully non-linear cost as you add more new operations. With CRDTs, you may find yourself entirely back at the drawing board. But the stuff you do support, you will support pretty well and reliably...

Personally, I prefer CRDTs for their elegance, but it can be difficult in a world of evolving requirements

Re:CRDTs are the future by Reinmar on Wednesday September 30, 2020 @11:47AM (#24640006)
> A real world implication is that if you want to add a new operation to a system (...) with OT, you can probably find a way to extend what you have to get it in there, with a painfully non-linear cost as you add more new operations

Exactly the experience that we have in CKEditor 5. OT is awfully complex. However, we can fine tune it for new operations and different scenarios of usage (e.g. undoing changes is one of them). With CRDT, at least to my understanding, we might've been limited to what we'd took into consideration on day one. Seeing how many things we learnt very late in the process (5 years so far, some documented in https://ckeditor.com/blog/Lessons-learned-from-creating-a-ri...) makes me thing that we'd sink the company twice already.

Re:CRDTs are the future by mdpye on Wednesday September 30, 2020 @12:15PM (#24640348)
Big respect for what you've achieved.

I worked on a prototype for a couple of months which would have been a partial competitor to CK. We went with CRDTs because it was quicker to get something simple and reliable off the ground to demonstrate, but we were pretty sure we'd have to switch to support something for the longer term.

It wasn't chosen to go forward as a focus of the business, but it was one of the most fun periods of commercial programming I've done :)

Re:CRDTs are the future by alextheparrot on Monday September 28, 2020 @03:14PM (#24620239)
I agree complexity is worth considering, though part of me wonders how important that is in this case. The reason for this intuition is that this is one of core parts of what they’re selling.

If you’re going to invest your complexity budget somewhere, it seems like this is a good place for companies dealing with these structures.

Re:CRDTs are the future by zamalek on Monday September 28, 2020 @02:34PM (#24619862)
Dealing with text is still an active area of research for CRDTs. While the problem has been theoretically solved, the solutions require much more memory/bandwidth than OT does.[1] Conversely, CRDTs are significantly better at replicating graphs.

yjs[2] is one CRDT that handles text reasonably well, but it can still run into performance edge cases (as they plainly/honestly admit in their README).

[1]: https://github.com/automerge/automerge/issues/89 [2]: https://github.com/yjs/yjs

Re:CRDTs are the future by eptcyka on Tuesday September 29, 2020 @04:49AM (#24625399)
Have you watched the presentation referenced in the article? CRDTs have come a long way. You can get down to about a 150% increase in size over a plain text representation. Since most rich text formats store the edit history anyway, this is closer to feasible than the numbers might suggest.
Re:CRDTs are the future by z3t4 on Monday September 28, 2020 @02:16PM (#24619658)
The transform operation is more simple if you know the order of things. For example in OT: nr2) Delete H from index 0. nr1) Insert "Hello" at index 0. You know that nr1 should come before nr2 because of a central counter. But with CRDT it's a) Delete character id 0, b) Insert "Hello" at character with id 0.
Re:CRDTs are the future by andreareina on Tuesday September 29, 2020 @12:05AM (#24624061)
I think intention preservation requires that you know what the clients know about. So you still need something like a vector clock to model what the dependency relationship between nr2 and nr1 are.
Re:CRDTs are the future by z3t4 on Tuesday September 29, 2020 @01:23AM (#24624395)
Yes, in OT the clients can send what they think is the global counter. Then each client or the server can transform the edit operation from the edit history eg. move the index left/right. In CRDT each index is instead an ID and deleted characters has to be saved as "tomestones" so you know where they where.
Re:CRDTs are the future by cordite on Monday September 28, 2020 @01:43PM (#24619272)
What does OT stand for?

In the link, OT is aliased to "Operational Transformations"

Re:CRDTs are the future by dwb on Monday September 28, 2020 @01:48PM (#24619332)
Have you not answered your own question? OT does indeed stand for Operational Transformation.

https://en.wikipedia.org/wiki/Operational_transformation

Re:CRDTs are the future by mjhirn on Monday September 28, 2020 @02:52PM (#24620038)
"Operation Transformation" = "a system that supports collaboration functionalities by separating the high-level transformation (or integration) control from the low-level transformation functions"

Source: OT's Wikipedia article

But I felt the same. Never heard of "Operation Transformation" before and both OT and its alias were equally opaque to me.