-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
networkEnabled = YES has no effect when using authenticateWithAppID:token: #351
Comments
@martinoneutrino hello there, The authentication method May i ask you how many entities are you currently handling?. All of your legacy entities should get caught by this routine, which is in charge of detecting entities without simperiumKey or ghostData. That would be a great start to begin debugging!. Thank you! |
I haven't had any problems using |
@martinoneutrino please, do not use In order to avoid any confusions, this property will be moved over to the Regarding the sync'ing, are you observing any errors in the console?. Please, try enabling verbose logging first. Thanks! |
What is the best method of getting sync status and/or completion events? If I am performing a lengthy operation on a full dataset, I need to be able to provide feedback to the user. Even a fast sync still only does 20-30 objects/second. Here is the only part that indicates any kind of error (I did have verbose logging enabled the first time, but it was just too much information for just trying to get an idea of the flow of updates. I'll try it again with that enabled to see if anything interesting shows up):
|
OK, it turns out that I was not waiting long enough. However, it took a 5 minute timeout before it resumed (and finished) the sync.
|
We have an issue open to implement sync'ing status. One of the main caveats to this is: Simperium is a streaming protocol, which allows multiple devices to update any of the objects, at any time. The real sync'ing status would be given by... [Local Changes] + [Remote Changes]. Trick to this is: local changes (might) be rejected by the backend / rebased, and as for Remote Changes, we might have devices that actually modified the dataset, but are offline. Real sync'ing status would be though to implement. We could, perhaps, expose the Local Pending Changes (which would be roughly the same property you've been using, numChangesPending, but with a couple updates so it's a non expensive operation (the private method can be quite expensive in terms of time!). Regarding the error you've posted few days ago:
That would (possibly) be caused by an entity that got inserted in the backend dataset, but the iOS client didn't receive the acknowledge. Would you please confirm if this 5 minute timespan goes by, without anything in the console ? (verbose=on), meaning... "isn't anything happening" ? If possible, it'd be awesome if you could send us some console logs. Would love to take a look: jorge.perez [at] automattic (dot com) Thanks in advance! |
I don't think it is necessary for the purposes of the sync status to be aware of unknown (offline remote) changes. |
@martinoneutrino You can learn about the Simperium Streaming Protocol Here. The backend + clients simply receive the new changes via websocket, yet, the server is never aware of How many changes are pending to be sent. That's just a client implementation detail. I've just moved issue #9 to release 0.7.0, and added a note to implement a non-expensive Regarding the logs, we'd need to check if sync'ing is getting stalled for some reason (nothing is being printed out for a long period of time), or it actually takes up to 5 minutes with un-interruped messages going through. Thank you again! |
I look forward to getting an inexpensive local pending count. My original issue still stands (re-enabling the network using |
@martinoneutrino Would you please verify if you're still having this issue with the latest develop code?. networkEnabled property has been updated, this should no longer be an issue. Thank you! |
The issue no longer occurs when using the develop branch. |
@martinoneutrino thanks for verifying that!. Regarding the 5 minutes upload, please, set Thanks! |
Let's move the Sync'ing glitch hunt over to #356 Thanks for your feedback @martinoneutrino ! |
If I set
networkEnabled = NO
before I callauthenticateWithAppID:token:
, I cannot get the network to restart (and syncing to occur), by a subsequent call tonetworkEnabled= YES
.It appears that the code uses different paths when using tokens vs user IDs. FYI, my app is using tokens, and not prompting for usernames/passwords, and I am using the 0.6.9 release.
(The reason I am disabling the network is because I'm trying to find the cause of a separate bug where not all existing entities are being uploaded.)
Martin
The text was updated successfully, but these errors were encountered: