Coder Social home page Coder Social logo

Comments (1)

neilj avatar neilj commented on August 21, 2024

It's not different for different objects; I think you're looking at updates to lists (queries) vs updates to types.

For getFooListUpdates, we need to return what has been added to the query (and their index) and what has been removed.

For getFooUpdates, we return the ids of objects that have been created/updated (as the changed response), and those that have been destroyed. The removed is separate because the client can just purge these from the cache. The created/updated are merged because this is easier for the server (less book keeping required) and shouldn't matter to the client: if you have the object already it was clearly an update, and you need to refresh any mutable properties. If you don't have the object, it doesn't matter if it's new or modified – if you want a complete offline cache you need to fetch it (and its probably new if you were previously synced) and if you are doing a partial cache you will probably ignore it – you only fetch if it appears in one of the queries you're interested in.

from jmap.

Related Issues (20)

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.