I’m planning to add live chat to my app. I will use live query. But in front of my parse servers, I have nginx as reverse proxy. I want to direct live query to specific server. But rest guide on docs doesnt have any endpoint for live queries.
Whats the endpoint for live queries? Or how can I send live query requests to same server on nginx?
LiveQuery uses websockets so you need to upgrade your connection to ws:// or wss://, If you are running your Live Query server on the same port as your parse server, you can use that. It’s recommend to separate your live query server though:
You can look at the spec to see how to establish a connection with a live query server:
Well, I don’t use Android, so I won’t pretend to be an expert there, but from what I know from the other SDKs (iOS, Swift, and JS) they all seem to work the same in reference to your question above. So yes, since you are not supplying a specific LiveQuery URL, it will use your parse server one and upgrade it to a web socket for LiveQueries, ws://server:1337/parse/. And this will work if you enable the live query server on your parse server.
The docs I linked earlier mention that running a LiveQuery server on your Parse Server can cause a bottleneck depending on your application and provides some suggestions for scalability. If you end up using the docs suggestions, you will probably end up specifying a different LiveQuery server URL than your Parse Server URL.