Cloudkibo / CloudKibo

CloudKibo
0 stars 0 forks source link

Upward sync push discarded due to payload size limit exceeded #506

Closed sumairasaeed closed 7 years ago

sumairasaeed commented 7 years ago

Discussed this issue with @sojharo that the push response received from server in response to upward sync API call sometimes become large if pending data was large. In this case push is discarded and not sent.

Here is the screenshot:

screen shot 2017-03-28 at 4 25 27 pm

Also, here is screenshot of large payload:

screen shot 2017-03-28 at 4 25 03 pm
sojharo commented 7 years ago

https://github.com/Cloudkibo/Android/issues/561#issuecomment-289997700

As discussed in above comment, I would work here to avoid sending push notifications in response of http request of upward sync. The http response would also contain this payload which was first being sent as push notification and was increasing payload size limit. This way client would handle it in response of http instead of push.

jekram commented 7 years ago

Thanks. Should we close this as this is already getting fixed in 561?

sojharo commented 7 years ago

We should close CloudKibo/Android#561 as I would be working only on server side.

jekram commented 7 years ago

Ok.

jekram commented 7 years ago

@sojharo

There were two issues on #561

I am assuming that we are talking care of both.

So we can do can do # 2 and # 4 and then do #3

I think you missed understood my question. I was asking why we need to send Push Notification to the Sender. Since we are going Rest Call to send the and if get success or failure why do we need notification in this case.

sojharo commented 7 years ago

I worked on this and now instead of sending response in of upward sync in push notifications I send it using http response. It was little bit difficult as lots of callbacks of mongodb were giving me responses and I had to aggregate them in a single response. Therefore it took me time. I need to keep this task open as now I need to do work on android side in response to these changes on server.

sojharo commented 7 years ago

Also I have thought of logic to avoid messages going in unordered way. I would also fix that in this same issue. I discussed this problem with sumaira again today.

jekram commented 7 years ago

Thanks

sojharo commented 7 years ago

I have completed the work on this. I also worked on android side to reflect changes on server.

jekram commented 7 years ago

Thanks