Skip to main content
March 2, 2021
Solved

About Data Sync option

  • March 2, 2021
  • 16 replies
  • 0 views

Hi All,

Could someone please help me understand the difference between data Sync and immediate data sync for record type.

I was referring "https://docs.appian.com/suite/help/20.4/Record_Type_Object.html#data-sync

and in that I am confused with the topics "Data sync" "Updating synced record types"  

Under "Data sync" the below criteria is given:

You should only enable sync for your record type if:

  • Your source data changes infrequently outside of Appian and it doesn't need to be synced into Appian more than once a day.

 

Where under the topic  "Updating synced record types" it talks about immediate update?

Thanks

Faisal

    Best answer by peter.lewis

    Yeah this is a good explanation. Just to add to this, I think the key phrase in the documentation is that "Your source data changes infrequently outside of Appian..." Let's contrast different ways that the sync could work with a few examples:

    • Example 1: Suppose you have a Web Service that you would like to sync into Appian that contains a reference list of products used in your application. The source data in this web service changes infrequently (and is not updated by Appian), so the sync runs once per day to add any new products to the cache stored in Appian.
    • Example 2: Suppose you have a database table that you would like to sync into Appian. This database table contains a list of claims made for each product and rows are inserted / updated entirely in Appian. In this case, the sync will always have the current data because any insert or update using the Write to Data Store Entity will also sync the data into the cache.

    Both of these examples are good use cases for using the sync but they just work differently; Example 1 syncs once a day, but the data changes infrequently, and Example 2 will always have the current data synced.

    16 replies

    March 2, 2021

    Hi Faisal,
    you might think about the data sync like a cache. The size limit of the cache is 100,000 rows. Appian loads data from the original source into the cache to speed up the access time for record retrievals. This sync happens once a day. So your users should be good with this fact and not expecting 'real time' data.

    The immediate sync happens when Appian is updating the original data source. This triggers that the cache gets updated too. 

    I hope this make sense.

    marco.amador
    March 2, 2021

    Hi Faisal,

    Synced records should be ideally used to cache reference data, so data that is not updated very often. Otherwise this would require a lot of sync operations and this would defeat the purpose of having the data cached. This is what the...

    'You should only enable sync for your record type if:

    • Your source data changes infrequently outside of Appian and it doesn't need to be synced into Appian more than once a day.'

    refers to.

    So the most common scenario is to have the sync operation for a synced record happening either during the defined scheduled for the sync (once a day) or when performing a manual sync.

    However in some cases you might need to update that reference data using your process models. As per the point above you would for instance call a Write to Data Store Smart Service to update a row of your synced record but the record would be out of sync. The immediate update is the capability that Appian has to update the cache in these occasions, so that you won't need to wait for the daily sync or run a manual one.

    Hope this helps!

    peter.lewis
    Employee
    March 2, 2021

    Yeah this is a good explanation. Just to add to this, I think the key phrase in the documentation is that "Your source data changes infrequently outside of Appian..." Let's contrast different ways that the sync could work with a few examples:

    • Example 1: Suppose you have a Web Service that you would like to sync into Appian that contains a reference list of products used in your application. The source data in this web service changes infrequently (and is not updated by Appian), so the sync runs once per day to add any new products to the cache stored in Appian.
    • Example 2: Suppose you have a database table that you would like to sync into Appian. This database table contains a list of claims made for each product and rows are inserted / updated entirely in Appian. In this case, the sync will always have the current data because any insert or update using the Write to Data Store Entity will also sync the data into the cache.

    Both of these examples are good use cases for using the sync but they just work differently; Example 1 syncs once a day, but the data changes infrequently, and Example 2 will always have the current data synced.

    sunilz6150
    March 3, 2021

    Hi Peter,

    In a scenario which is configured as explained in Example 1, I noticed that in case the daily sync fails for some reason (for example: a connection timeout when calling the webservice) the record data is removed from Appian causing errors in the rules and interfaces that use this record type. I would expect Appian sync to fail but retain the last synced data instead of cleaning it up and causing the record type to be inaccessible. One of the factors to consider is that since the source of the record type is an external webservice, there could be days when there is an unexpected service degradation that can cause scheduled (once a day) sync to fail. 

    Do you consider this as an issue and is there a way to get around these scenarios? Please let me know if I missed something.

    March 2, 2021

    Thank you very much Peter and Marco and juergeng393. You have nicely explained this. I have no doubt now.

    May 13, 2021

    If DataSource for any record is Database view (data might be coming from different table) then how sync will work..I mean if any table involve in view is updated then data will be refreshed ?

    stefanhelzle0001
    Brainy
    May 13, 2021

    No. Appian does not know about updates in your view. Would a scheduled resync work? With 21.2 you might be able to build that view inside Appian with synced records. Then data would always be up-to-date.