Here are a few details in my current setup to keep in mind for this discussion to be meaningful.
Client App: Xamarin Forms app, uses Azure offline Sync
Web Access: There is a Asp.Net based web front end that also accesses the Mobile Service to read/ write data to the underlying tables
Backend: Managed dot net based App Service hosted on Azure
My Question: As of now I pass a null value to Incremental Sync parameter to ignore any incremental sync (while using PullAsync method) & get all data from the server. This however is inefficient as it increases the load time as the volume of data increases.
If I use a constant value for Incremental Sync parameter for the table under consideration, this is what it does
Each time a pull operation returns a set of results, the latest updatedAt timestamp from that result set is stored in the SDK local system tables. Subsequent pull operations will only retrieve records after that timestamp.
as read here
The problem is, my web access also updates the data from web & it also uses Azure App service framework to do that. In this case, if I use the incremental sync parameter do a Pull of data, then there is a change on the data from the web app & if the mobile app again does a Push, Pull.. will it get the latest changes from the web too?
My understanding is that incremental sync only works with the data the context is aware of, but in this case because the web app is also writing the data, which the context is not aware of, then it misses some of the data & the mobile app never downloads it.
Is there a way to fix this behavior? So I can start using incremental sync & still be able to ensure that the app always gets all the data from server without missing any bits?
Update:
@Adrian it's not working for me. May be because the way my Tables are structured, or the way i am dealing with them is not correct.
I have a User Table & a Department Table, I also have a UserDepartment Table.
When I sync the app, the data in this UserDepartment Table gets duplicated on the app.
The reason could be because, when I edit the user on web to assign departments to them, I delete all previous User Department entries from UD table & recreate new ones based on current selection. Do you think this could be causing issues with azure client SDK & thus duplicating some data for me?