Comments (6)
Created a JS SDK Issue ere: parse-community/Parse-SDK-JS#2114
from parse-server.
Thanks for opening this issue!
from parse-server.
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.
Note: the scope of this issue in regard to the bounty includes parse-community/Parse-SDK-JS#2114
from parse-server.
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.
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)
- Parse.Cloud.beforeLogin doesn't trigger the first time when linked with AuthData. HOT 3
- Dynamic master key and maintenance key HOT 1
- Playground is not working HOT 1
- Allow the use of Cookies for authentication HOT 1
- Ability to override the global JS SDK within the Server runtime HOT 4
- Remove unregistered FCM tokens HOT 3
- beforeSubscribe, onLiveQueryEvent and afterLiveQueryEvent hooks are not called (LiveQuery) HOT 1
- Run parse server HOT 3
- request_password_reset: insufficiently escaped URL is incorrectly converted turned into a clickable link by GMail receiving plain text email HOT 7
- Schema Migration Overriding exist Indexes HOT 15
- `new Date()` in aggregation node.js HOT 8
- Add support for Facebook auth JWT token HOT 5
- Parse server V6.2.0 does't return session token after logInWith google HOT 1
- Querying non-existent classes throws an undefined error. HOT 1
- configure PARSE_SERVER_CLEANUP_INVALID_INSTALLATIONS without environment vars HOT 2
- Remove `push_id` and `push_time` from push notifications HOT 4
- Codecov not working HOT 3
- Docker build is failing HOT 1
- Upgrade to Parse 5.1.0 fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-server.