Cloudkibo / Android

0 stars 0 forks source link

new way to do upward sync #552

Closed sojharo closed 7 years ago

sojharo commented 7 years ago

This task is to modify current sync so that it becomes efficient. Discussed in :

https://docs.google.com/document/d/1OuH-Fr3b2TjBNDRpIzDMdI7dzf4exd15EWAxiWyU5k4/edit

This task is for upward sync

jekram commented 7 years ago

@sojharo

Q: Are the performance issue we are seeing. Is the issue happening because of upward sync or downward sync? Which is the main culprit?

Q: In our testing how many messages were in the queue when we saw this issue?

Q: Why the client would not update with the notification services? When the server has to send something, it sends the notification to the iOS and Android, and these are queued by the notification services. When the client comeback up would it not get these notifications and try to get these data?

Q: What do we know in testing WhatsApp how this is handled by WhatsApp?

@sumairasaeed

jekram commented 7 years ago

@sojharo

Q: Are the performance issue we are seeing. Is the issue happening because of upward sync or downward sync? Which is the main culprit?

Q: In our testing how many messages were in the queue when we saw this issue?

Q: Why the client would not update with the notification services? When the server has to send something, it sends the notification to the iOS and Android, and these are queued by the notification services. When the client comeback up would it not get these notifications and try to get these data?

Q: What do we know in testing WhatsApp how this is handled by WhatsApp?

Q: In the current client we are only doing incremental sync on both Android and iOS?

@sumairasaeed

sojharo commented 7 years ago

Q: Are the performance issue we are seeing. Is the issue happening because of upward sync or downward sync? Which is the main culprit?

Main Culprit is the upward sync. As stated in document also, it runs move http requests.

Q: In our testing how many messages were in the queue when we saw this issue?

Mostly, the messages are two or three. However, there other type of http requests which are done too i.e. to check status of sent messages, to send the status of received messages.

Q: Why the client would not update with the notification services? When the server has to send something, it sends the notification to the iOS and Android, and these are queued by the notification services. When the client comeback up would it not get these notifications and try to get these data?

Because of short life of push notification, it doesn't reach device if device was offline. So device will not know that there was a push notification to get the data.

Q: What do we know in testing WhatsApp how this is handled by WhatsApp?

I asked similar question on quora and found that whatsapp does polling of messages on server instead of doing sync. https://www.quora.com/How-often-should-a-chat-app-like-WhatsApp-sync-with-a-server

Q: In the current client we are only doing incremental sync on both Android and iOS?

Yes, it is incremental sync. The amount of data is not problem as it is always small. The number of http requests sent to server from android is problem.

sojharo commented 7 years ago

This was done and completed.

jekram commented 7 years ago

Thanks. Please push.

jekram commented 7 years ago

FYI @sumairasaeed