Code Monkey home page Code Monkey logo

Comments (6)

helfer avatar helfer commented on June 15, 2024 3

@batjko That will depend on the exact circumstances. Firing manual invalidations will always have to be an option for performance and flexibility reasons, but in many applications where performance isn't critical, Apollo could do essentially what livequery is doing today and there would be no need to fire invalidations manually.

My guess is that we will have a version 0 where all invalidations have to be fired manually, and then we'll build more and more support for automatic invalidations for different backends.

from apollo.

stubailo avatar stubailo commented on June 15, 2024

In this case, it will probably need to be custom - you'll get to pick from one of three options:

  1. Either always invalidate that list whenever points change on any user (probably not good)
  2. Fire custom invalidations when you know for sure the points are close enough to be in the top list
  3. Render the list via polling and never invalidate it

from apollo.

deiucanta avatar deiucanta commented on June 15, 2024

How is this done currently in Meteor? I believe the server publishes all the users and the client has a reactive query through minimongo, right? But this is not scalable for, let's say, 1M users.

from apollo.

sebakerckhof avatar sebakerckhof commented on June 15, 2024

@deiucanta . No, the server does not have to publish all users. The main reason why the current approach is not very scalable (although this is always mentioned very vaguely, I haven't seen any good benchmark yet), is that the server has to process all changes to a database, even if they are irrelevant to the users connected to that server + the server has to cache all the data a client is subscribed to (called the mergebox) in order to only send data once.

from apollo.

deiucanta avatar deiucanta commented on June 15, 2024

@sebakerckhof makes sense

Any ideas on how RethinkDB does it? They can handle thousands of reactive queries.

from apollo.

batjko avatar batjko commented on June 15, 2024

Would the invalidation (e.g. @stubailo's options 1 and 2) have to be triggered 'manually' or would Apollo do it reactively, according to those custom rules?

from apollo.

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.