Remix.run Logo
api 3 days ago

It’s barely different from having multiple fat single page web apps editing a file in the cloud. All of those have local replicas of the data and present as if everyone is editing at once.

There are multiple ways to do this, like CRDTs plus raft based leader signaling for conflict resolution. The latter signaling requires almost no bandwidth. Raft based time skew adjustment works too if your problem domain can accept a small amount of uncertainty.

Like I said a lot of these same kinds of algorithms are used cloud side. All the big cloud stuff you use is a distributed system. Where the code runs is irrelevant. The cloud is just another computer.

jjcob 3 days ago | parent [-]

All these algorithms arent going to help if user A changes a headline from Arial to Helvetica while user B changes it to Helvetica Neue.

There is no way to tell which of the changes should win.

That's why most applications decided to require users be online for edits. when you have to be online, the chance of simultaneous edits becomes so small that you can just show an error message instead of trying to merge.

The online requirement also ensures that you are notified of conflicts immediately, which is vastly preferable to users. Nothing worse than working on a document for hours and discovering someone else also worked on the same document and now you have two edited copies that someone needs to consolidate.

That's the reason why offline first is becoming increasingly unpopular.