njwhites / checkin

A Check-In Application for the Sunshine School
1 stars 0 forks source link

Live updating issues #68

Closed ChrisRogersT closed 7 years ago

ChrisRogersT commented 7 years ago

Issue

On the internet browsers the app does not properly live update from a pouchdb instance on one browser to couchdb to a different pouchdb instance.

Details

Questions to investigate

ChrisRogersT commented 7 years ago

@njwhites2012 you said that in some way you were able to see changes made via the ipad on the desktop or vice versa, could you clarify that for me

ChrisRogersT commented 7 years ago
ChrisRogersT commented 7 years ago

I'm gonna lower us from defcon 3 to defcon 4 because it does seem like this is still working it just takes some time. But potentially an acceptable amount of time, on the order of 30 seconds. We should consider looking into where the app might be running slowly. I have been seeing some "[Violation] long running javascript task" in my console

ChrisRogersT commented 7 years ago

https://pouchdb.com/errors.html#replicating_attachments_slow

not sure that this is our issue but leaving this here for later

ChrisRogersT commented 7 years ago

more links for remembering https://www.youtube.com/watch?v=MALKo1bSa4Y https://www.bennadel.com/blog/3212-syncing-local-pouchdb-data-with-remote-ibm-cloudant-database-in-angular-2-4-1.htm https://docs.cloudant.com/replication_guide.html#filtered-replication

ChrisRogersT commented 7 years ago

I did some testing with a local db and it seems to confirm the suspicion that the issue isn't necessarily our code but more with the connection to the cloudant server. I'm going to watch that youtube link and see if I gain any insight from that, and if not email the cloudant support to see if they have any input. I'm also going to do a little testing from home because I feel that the work internet could possibly be limiting it in some way, although that would be a stretch.

hosley commented 7 years ago

@ChrisRogersT look here https://github.com/pouchdb/pouchdb/issues/6189 and this https://github.com/pouchdb/pouchdb/issues/5675

ChrisRogersT commented 7 years ago

Under the belief that the issue we have been having was caused by having too many live connections; I have updated auth provider and constants provider so that they don't have a local database and rather just use pouch as an interface to the remote couchdb. This seems to fix the issue so I am closing this issue.