Delay on event trigger
mohsan95 opened this issue · 4 comments
Hi,
I integrated parse live query in my app and i am facing delay in UPDATE event. It triggers right after 11 minutes of change done to the object from dashboard. The same code is working perfectly on Back4App but delays on my Parse server. The subscription is successfull everytime.
SubscriptionHandling<ParseObject> subscriptionHandling = parseLiveQueryClient.subscribe(query);
subscriptionHandling.handleSubscribe(new SubscriptionHandling.HandleSubscribeCallback<ParseObject>() {
@Override
public void onSubscribe(ParseQuery<ParseObject> query) {
Log.v(TAG, "subscribed successfully");
}
});
subscriptionHandling.handleEvent(SubscriptionHandling.Event.UPDATE, new SubscriptionHandling.HandleEventCallback<ParseObject>() {
@Override
public void onEvent(ParseQuery<ParseObject> query, ParseObject object) {
Log.v(TAG, "event occurred");
}
});
You could:
- begin by verifying that the server-client LQ connection is active at all times
- repeat to reproduce the issue to see whether there is any pattern, e.g. is it always 11mins, or by how much does the delay vary
- identify where the delay happens (and what causes it) by debugging Parse Server when you change an object and observe how the LQ server handles the request. That should answer the question whether the delay happens server side or client side.
I have implemented the same using JavaScript and I was getting response within 5 to 6 seconds. and in Android its exactly 11 minutes everytime.
using JavaScript and I was getting response within 5 to 6 seconds
A response time of 5 to 6 seconds seems relatively long in the first place. I would look into why it is that long and then use that information as a base to investigate the 11 mins response time. Response time is something that can depend on many factors (network, DB resources, server resources, etc).
I'm closing this as it does not seem to be a Parse Android SDK issue.
- For help with Parse Platform we recommend our community forum
- For coding questions we recommend Stack Overflow using the parse-platform tag
- For network and server questions we recommend ServerFault using the parse-server tag
Feel free to comment if you have any questions and we can re-open this issue.