Git Product home page Git Product logo

Comments (3)

ept avatar ept commented on August 26, 2024

You're welcome to use strong consistency if you want, but then your app will be slow because it requires a network round-trip for every update, and it won't work if the user is offline. If you want to be faster/work offline, you have no choice but to allow different users to update concurrently. In your example, an object could be in "two places at the same time" if you use a multi-value register (see section 3.2.2 of this document); this allows you to detect that multiple users changed the position independently, and enables you to build a user interface to resolve the conflict manually. Of course, if it's too much work for the user to resolve the conflict manually, you can also pick one of the values arbitrarily, perhaps based on some application-specific rule.

from crdt-website.

avin-kavish avatar avin-kavish commented on August 26, 2024

Regarding the network round-trip, I'm optimistically updating the state before each network call and reverting if the update fails. So there's no visible lag really. But yeah, I have to think about whether users would want to edit a collaborative workspace offline and synchronize afterwards. I think that's very application specific. miro.com for example, locks you out of the editing controls if you are not connected to their websocket.

from crdt-website.

ept avatar ept commented on August 26, 2024

If you're making an optimistic update and reverting if the update fails, what happens if two users simultaneously make an optimistic update to the same object? Presumably the server will arbitrarily pick one of them as the winner (perhaps the one that reached the server first, or the one that reached the server last) and send the winning value to all users. The end result is exactly what you criticised, namely an algorithm that picks one of the two updates based on some arbitrary criterion.

from crdt-website.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.