Giter Club home page Giter Club logo

Comments (6)

messagenius-admin avatar messagenius-admin commented on May 27, 2024 1

Created a JS SDK Issue ere: parse-community/Parse-SDK-JS#2114

from parse-server.

parse-github-assistant avatar parse-github-assistant commented on May 27, 2024

Thanks for opening this issue!

from parse-server.

mtrezza avatar mtrezza commented on May 27, 2024

I suppose this feature requires changes in Parse Server and at least the Parse JS SDK to a Parse client SDK to test with?

from parse-server.

mtrezza avatar mtrezza commented on May 27, 2024

Note: the scope of this issue in regard to the bounty includes parse-community/Parse-SDK-JS#2114

from parse-server.

mortenmo avatar mortenmo commented on May 27, 2024

Is this trying to solve a performance problem with too many https calls? Working a lot with ParseJS trying to make it work great offline lately, in my humble opinion this is probably not worth the effort.

Its not like you have to write the code for each object type but create a generic store that executes the logic you describe. We built one loosely based on https://github.com/parse-community/parse-react/blame/master/packages/parse-react-base/src/useParseQuery.ts which has a decent way of doing what you describe. I do think it is useful to get the "current results" when you subscribe (because you almost always need that), but this could be solved in the JS SDK completely today without doing pure queries over the websocket.

If it is a performance challenge to fix, why not put every request over the livestream, not just one you subscribe to. Then I'd like a mode where just all server comms go over the websocket and never uses https (ad-hoc finds, saves, etc).

from parse-server.

messagenius-admin avatar messagenius-admin commented on May 27, 2024

Hi @mortenmo,
thanks for sharing.

In this particular Issue, I'm trying to solve performance issues but with minimal impact on existing code and this is just a piece of a larger improvement.

The problem is that, even with the generic handler that you implemented in React, the client has to run a query (which means an HTTP call) each time the app is restored from an offline period, (even after being in background for just 1 second, in iOS)

The code you pasted:

... but create a generic store that executes the logic you describe. We built one loosely based on https://github.com/parse-community/parse-react/blame/master/packages/parse-react-base/src/useParseQuery.ts
the client is doing 3 operations for each Class:

is a great example of how each client SDK should manage to sync; in fact, we would need it for iOS, Android, Flutter, and others. We should open a feature request for each client.

why not put every request over the live stream [...] all server comms go over the websocket [...] (ad-hoc finds, saves, etc)

I would love it, but it may be a longer shot. I'll edit the Issue to add this option.

from parse-server.

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.