socketsupply / socket-examples

Socket Runtime Examples – see how your favorite front-end framework is used to build cross platform UIs
https://socketsupply.co/guides
MIT License
110 stars 12 forks source link

Add CRDT example #68

Open fivestones opened 1 year ago

fivestones commented 1 year ago

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

chicoxyzzy commented 1 year ago

CRDT is not a part of Socket Runtime at the moment. We are planning to add an example application which uses yjs or automerge for conflict resolution.

fivestones commented 1 year ago

Oh, that sounds fantastic! It seems like both those CRDT implementations have a lot going for them, and having an example of using them in a project like sucketsupply would be great.

chicoxyzzy commented 1 year ago

Issue transferred to the examples repo