Giter VIP home page Giter VIP logo

Comments (3)

grrowl avatar grrowl commented on May 20, 2024

Add verifyAsync option

  • expose option verifyAsync: function (action, cb)
    • cb(true): verified message
    • cb(false): invalid message, remove it from _updates.
  • expose option verifyStrict: bool to withhold unverified messages from replaying to peers
    • it will probably still have to influence the logical clock. we can't roll it back.
  • [wish] allow dispatching before validation, even when verifyStrict is false
    • we'll have to increment the logical clock, even for invalid actions; or play the message with a made-up logical timestamp
    • if we're strictly validating actions, they shouldn't ever increment the logical clock

questions

  • on cb(true), do we replay that action with meta.@@signature/VERIFIED: true
    • orderedHistory says yes: keeps all history states in line with the latest reality
  • on cb(false), pretend like that action never happened.
    • if verifyStrict, simply drop it from _updates
    • if not verifyStrict, remove it from history
    • seems like this gets in the way of the _updates/orderedHistory merge work

from redux-scuttlebutt.

grrowl avatar grrowl commented on May 20, 2024

Related discussion, "Why syncing actions instead of data model?"

There's also a bit of talk about CRDTs which don't really require the time travel functionality we've implemented, but they're not hurt by it. Currently, an action like ADD_MESSAGE can simply return state.concat(message) (that is, push it onto the state array) and even outdated/old actions from remote peers will be inserted at the correct position in the array.

from redux-scuttlebutt.

grrowl avatar grrowl commented on May 20, 2024

With dispatcher options verifyAsync and signAsync added, message signing and validation can be enabled by other modules (such as the in-progress redux-signatures)

from redux-scuttlebutt.

Related Issues (14)

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.