Data sync configuration

Data sync configuration

  

Hi all,

I'm trying to figger out a way to have a different flow in the sync action for each trigger (Login, On Resume and On Online). Apparently the sync unit parameter can be used for this purpose. But how do I assign it for each trigger so I can split my flow in the sync action?

Thanks,

Artuur

Hi Artuur.

You can collect some useful information about this issue in this post.

Cheers,

GM

Hi Gonçalo,

I had a look at the offline data sync patterns sample app, but they weren't using the Sync Unit to split the flow in the sync action. 

It works to pass a certain sync unit input parameter when you trigger the sync by having the OfflineData Sync action or TriggerOfflineDataSync action in an action (e.g. in SyncOnLogin, OnApplicationResume or NetworkStatusChanged). But I feel this is not the optimal way since you have to disable the SyncOnOnline and SyncOnResume triggers in the OfflineDataSyncConfiguration action, thus not making optimal use of the detection of these events in the layout block. The OnSyncStart event of this layout block has a SyncUnit input parameter too, but I don't know how to assign a specific text to it, so I know in my sync action what triggered the sync exactly. 

Any thoughts to improve or is my practise OK?

Thanks,

Artuur  

Hi Artuur.

Sorry about the late reply.

Theoretically, it seems to make sense in general, but this is really a practice exercise that will depend on a lot of different factors that can vary from one case to another.

Just be sure about: 

  • the most used actions and information on your use cases, 
  • try to take into account those that can be made offline and others only online to find a balance,
  • analyze the time spent and amount of data needed on your network tools.
  • adjust step by step the sync according to your needs across the app development.
  • there's no recipe for it! Just guidelines.

Good luck!

Cheers,

GM



 

Hi Gonçalo,

thanks for your reply and for pointing out these general guidelines to follow when syncing.

I will keep them in mind. The sync might just be the most dynamic part of a mobile app!