←back to thread

221 points charlieirish | 2 comments | | HN request time: 0s | source
Show context
ezekg ◴[] No.43537495[source]
It'd be nice if the post went into how conflict resolution will (?) work because that's the hard part here and the main selling point imo.
replies(4): >>43537590 #>>43537889 #>>43540353 #>>43541448 #
bob1029 ◴[] No.43537590[source]
Conflict resolution can't work in a general sense.

How you reconcile many copies of the same record could depend on time of action, server location, authority level of the user, causality between certain business events, enabled account features, prior phase of the moon, etc.

Whether or not offline sync can even work is very much a domain specific concern. You need to talk to the business about the pros & cons first. For example, they might not like the semantics regarding merchant terminals and offline processing. I can already hear the "what if the terminal never comes back online?" afternoon meeting arising out of that one.

replies(3): >>43539211 #>>43539276 #>>43540843 #
ochiba ◴[] No.43539211[source]
I would say this is why server-authoritative systems that allow for custom logic in the backend for conflict resolution work well in practice (like Replicache, PowerSync and Zero - custom mutators coming in beta for the latter). Predefined deterministic distributed conflict resolution such as CRDT data structures work well for certain use cases like text editing, but many other use cases require deeper customizability based on various factors like you said.
replies(2): >>43539258 #>>43539279 #
jahewson ◴[] No.43539258[source]
CRDT falls flat for rich text editing though. So many nasty edge cases and nobody has solved them all, despite their claims.
replies(1): >>43539618 #
1. mentalgear ◴[] No.43539618[source]
have you tried loro
replies(1): >>43540152 #
2. mmerlin ◴[] No.43540152[source]
https://loro.dev/