socket-examples icon indicating copy to clipboard operation
socket-examples copied to clipboard

Add CRDT example

Open fivestones opened this issue 1 year ago • 3 comments

I'm just wondering how this works when there are conflicts. E.g., If I am running the same app on two different devices, and my internet goes down on one of them, and then I make some changes (say I change an item to a to-do list on one device, and delete the same item on the other device), what determines which thing happens once the devices come back online and sync their state? Is there some sort of CRDT running on sockets? How do they end up in the guaranteed same state as each other? Your web-site says this is for developing local-first apps, and links to Ink & Switch's paper on the topic, so I figured something must be done in sockets to make this work, but I don't see any mention of how it might work on the website or in the docs.

What OS are you using (uname -a, or Windows version)?

MacOS, iOS

What programming language are you using (C/C++/Go/Rust)?

Javascript...?

What did you expect to see and what you saw instead?

n/a

fivestones avatar Mar 19 '23 17:03 fivestones