News for hackers. Stuff that matters.
Re:You might not need a CRDT by inglor on Monday December 05, 2022 @11:56AM (#33868132)
So with your solution, the inserted table cell would "disappear" from what is rendered?

That's not necessarily (depends on the product) great or even acceptable user experience. As a user I would certainly want a way to know there is an "orphaned" "edited after delete" cell to salvage the data inputted or understand the confusion between editors.

Re:You might not need a CRDT by georgelyon on Monday December 05, 2022 @12:11PM (#33868385)
The best UX resolution to this kind of issue I have seen is to display “This table cell was added by Bob concurrently to Alice removing its row. How would you like to proceed: recover the row or ignore the change?”
Re:You might not need a CRDT by drfuchs on Monday December 05, 2022 @01:14PM (#33869367)
Who gets the pop-up? If both Alice and Bob, and they simultaneously give conflicting replies, you're right back to where you started.
Re:You might not need a CRDT by tomhallett on Monday December 05, 2022 @01:39PM (#33869785)
Stupid question - are there any good resources on User Experience patterns/recipes for implementing OT/CRDTs?

Context - a lot of the literature is about the backend algorithm. But that still leaves individual teams tripping over the frontend interaction design and usability.

Example of what I'm looking for - hex.tech has a video tutorial of their "Cell locking" feature, where the cell gets disabled and a "Mac Lockard has taken control of a cell you were editing" toast notification appears. [1]

1: https://hex.tech/blog/a-pragmatic-approach-to-live-collabora...

Background - most of the material is about the backend, which makes sense, but there's still a lot to

CRDTs and common patterns/tradeoffs you can present to users? For example, a "Don't make me think" to pair with Kleppmann's "CRDTs: The Hard Parts".

Re:You might not need a CRDT by toomim on Monday December 05, 2022 @03:12PM (#33871210)
This is close: https://decentpatterns.com/library/

...but my general belief is that UI patterns need to evolve as (1) specific UIs before they become (2) general patterns, and we simply don't have enough good solutions yet to make a pattern library out of them.

Re:You might not need a CRDT by tomhallett on Monday December 05, 2022 @06:44PM (#33873629)
Very cool - thanks!
Re:You might not need a CRDT by Dylan16807 on Monday December 05, 2022 @01:33PM (#33869688)
You're not back to where you started. You've gone from a technical conflict to a direct disagreement about what is supposed to happen. There's no technical solution to an edit war. So maybe ask anew about the conflicting answers, or pick one arbitrarily at that point. Or make them play rock paper scissors. But it still helps to ask before it becomes a direct disagreement.
Re:You might not need a CRDT by georgelyon on Monday December 05, 2022 @01:29PM (#33869626)
Yes, this is the correct behavior. If Alice and Bob disagree about whether or not that row should be in the table you aren't going to fix it with math. More often than not, the expected outcome will be obvious (i.e. spelling correction in a deleted cell can be ignored) and if it isn't obvious, there will need to be human interaction to determine the best path forward.
Re:You might not need a CRDT by layer8 on Monday December 05, 2022 @01:32PM (#33869680)
This isn’t really a problem. If Alice and Bob keep disagreeing, then it is appropriate that a conflict remains unresolved.
Re:You might not need a CRDT by jlokier on Monday December 05, 2022 @04:12PM (#33871995)
Usually that doesn't happen because their replies don't conflict within the time interval of a round trip between the two of them, so one can see the other's action first, and decide to agree.

But if it does happen, either they get a new popup, eventually, saying that their conflict-resolution decisions also conflicted and what would they like to do, or the system decays to a CRDT-style pre-determined resolution rule for the second-order conflict -- with similar problems to the original CRDT resolution rule we tried to avoid. Things like "give priority to the person who chose to keep information instead of deleting", "give priority to the person with the biggest random number", "merge them by keeping information along with a note in the document about the attempt to delete the column", or "delete the column and put the edited cell in a note". But this time, only when the users conflict after the first popup, so it doesn't occur as often.

I think you're describing a metastability effect which occurs in all distributed systems that don't use pre-determined resolution rules like pure CRDTs. It happens in network protocols, distributed transactions, and consensus protocols in general. If the process you use to resolve depends on input from multiple parties who don't have a way to communicate and could choose conflicting values, there's a non-zero probability of needing another round or to escalate upwards to a higher-level system to resolve.

In many technical systems, provided there's a way to communicate it's not difficult to make the probability of repeated rounds or escalations tend arbitrarily close to zero (but not actually zero). If there's a possibility of network partition, though, the conflict can come back later when communication returns; there's no way to completely make it go away.

Re:You might not need a CRDT by josephg on Monday December 05, 2022 @06:16PM (#33873329)
Yep. And, to point it out, good CRDTs have all the information they need to implement all of this.

Git marks conflicts when merging. CRDTs could do the same, but I don't know any which have implemented this stuff yet.

Re:You might not need a CRDT by jameshart on Monday December 05, 2022 @03:27PM (#33871388)
What you would ‘certainly want’ depends very much on the application this is implemented in. The data isn’t gone from the CRDT table unless the program decides it is, so many ui choices are possible.