The Fabric SET SYNC command is used to define the synchronization mode of an instance from source systems. The default value is On.
Syntax:
Sync Mode |
Description |
When is an Instance Synced? |
ON |
Run a sync according to the Sync method which can be None, Time Interval, Inherited or Decision Function. |
|
OFF |
Don't sync. |
Synchronization is not performed, however if the LU instance already exists in Fabric, it will bring the existing LU instance data based on the most updated LU Schema definition. If the LU instance does not yet exist in Fabric, the following warning message is displayed:Instance '<LU Name>:<Instance ID>' was not found and Sync is disabled. |
FORCE |
Always sync. |
Synchronization is performed on every operation on the Fabric LU instance, regardless of the sync method definitions of the LU. The only exception is when using a Decision function. If the Decision function returns False, the data is not synced. |
DELTA |
Delta sync. |
Valid in the iidFinder in Delta Partition mode when there is no delta will be running in Sync Off mode otherwsie Sync On. |
Note that the sync returns an error message when a source is not available. To change this, use the set ignore_source_exception true command.
Sync On Protection improves the response time of multiple GET LUI requests on the same LUI and Fabric node. For example, when executing a stress test by running a Web Service with the same LUI on multiple threads.
In principle, since each request requires a write lock in the LUI's MicroDB, multiple requests on the same LUI and Fabric node are executed sequentially if their Sync mode is set to ON. This means that even when LUI populations are not run, a short check can take a long time before the last GET is successful.
To avoid checking each LUI, Fabric implements Sync mode (Sync is set to ON) only on the first GET request on the LUI. Remaining requests are executed in parallel to the first request, and are executed with the Sync mode set to OFF.
SYNC_PROTECTION can be edited in the config.ini file:
SYNC_PROTECTION can be disabled on the session level using the SET SYNC_PROTECTION=off command.
The Force Upgrade Post Deploy checkbox is defined for each predefined Fabric server in the Server Configuration window:
This checkbox defines the Sync mode of the first GET of each LU instance (LUI) after the LU is deployed to the server:
Notes
Example 1
Example 2
Click for more information about the Get LUI Fabric Command.
The Fabric UserCode class holds the method that returns the Sync mode set for the current session:
public static String getSyncMode();
This method can be invoked by a Decision function.
For example, if the Sync Mode is Force, then return True to sync the instance. Else, do not sync the instance.
To view the list of Fabric APIs, click http://[Fabric IP address]:3213/static/doc/user-api/index.html.
Starting from Fabric 7.0, this feature is replaced by SET SYNC_ON_DEMAND = ALWAYS.
The purpose of a Sync On Demand mode is to reduce the time spent by Fabric performing the LUI sync by synchronizing only the relevant data. In this mode, the sync is performed only on tables that are a part of the executed SELECT statement and their parent tables. The sync follows the standard Sync mechanism rules that are based on a LU predefined sync method and sync mode.
The logic of the Sync On Demand is as follows:
Performing the GET command doesn't trigger the instance synchronization, as the synchronization is done in SYNC OFF mode. If the instance doesn't yet exist in Fabric, a full sync is performed.
When executing the SELECT statement on LU tables, the evaluation is performed whether a sync is required or not. The evaluation is done only for the LU tables and their populations in the SELECT statement and for their parents up to the Root table. The synchronization logic follows the standard Sync mechanism rules that are based on a LU predefined sync method and sync mode.
When executing the SELECT statement on LU business tables, the evaluation is performed on a business table and its parents.
Sync On Demand can run in 2 different modes as follows:
Sync On Demand is also supported when AUTO_MDB_SCOPE is set to true (the 'No Get' mode).
Note that an implementor should manage the transaction efficiently. Thus when a Web Service or GraphIt invokes several SELECT statements on the same LU, it is under the implementor's responsibility to manage the transaction in order to minimize the number of writes into the MDB Storage.
Syntax:
To define a Sync On Demand mode either:
Example 1: Sync On Demand = TRUE
Example 2: Sync On Demand = ALWAYS
Perform GET LUI.
Select from the CASES LU table. As a result:
Select from the CASE_NOTE LU table. As a result:
Example 3: Several SELECTs in a Web Service or GraphIt
The Fabric SET SYNC command is used to define the synchronization mode of an instance from source systems. The default value is On.
Syntax:
Sync Mode |
Description |
When is an Instance Synced? |
ON |
Run a sync according to the Sync method which can be None, Time Interval, Inherited or Decision Function. |
|
OFF |
Don't sync. |
Synchronization is not performed, however if the LU instance already exists in Fabric, it will bring the existing LU instance data based on the most updated LU Schema definition. If the LU instance does not yet exist in Fabric, the following warning message is displayed:Instance '<LU Name>:<Instance ID>' was not found and Sync is disabled. |
FORCE |
Always sync. |
Synchronization is performed on every operation on the Fabric LU instance, regardless of the sync method definitions of the LU. The only exception is when using a Decision function. If the Decision function returns False, the data is not synced. |
DELTA |
Delta sync. |
Valid in the iidFinder in Delta Partition mode when there is no delta will be running in Sync Off mode otherwsie Sync On. |
Note that the sync returns an error message when a source is not available. To change this, use the set ignore_source_exception true command.
Sync On Protection improves the response time of multiple GET LUI requests on the same LUI and Fabric node. For example, when executing a stress test by running a Web Service with the same LUI on multiple threads.
In principle, since each request requires a write lock in the LUI's MicroDB, multiple requests on the same LUI and Fabric node are executed sequentially if their Sync mode is set to ON. This means that even when LUI populations are not run, a short check can take a long time before the last GET is successful.
To avoid checking each LUI, Fabric implements Sync mode (Sync is set to ON) only on the first GET request on the LUI. Remaining requests are executed in parallel to the first request, and are executed with the Sync mode set to OFF.
SYNC_PROTECTION can be edited in the config.ini file:
SYNC_PROTECTION can be disabled on the session level using the SET SYNC_PROTECTION=off command.
The Force Upgrade Post Deploy checkbox is defined for each predefined Fabric server in the Server Configuration window:
This checkbox defines the Sync mode of the first GET of each LU instance (LUI) after the LU is deployed to the server:
Notes
Example 1
Example 2
Click for more information about the Get LUI Fabric Command.
The Fabric UserCode class holds the method that returns the Sync mode set for the current session:
public static String getSyncMode();
This method can be invoked by a Decision function.
For example, if the Sync Mode is Force, then return True to sync the instance. Else, do not sync the instance.
To view the list of Fabric APIs, click http://[Fabric IP address]:3213/static/doc/user-api/index.html.
Starting from Fabric 7.0, this feature is replaced by SET SYNC_ON_DEMAND = ALWAYS.
The purpose of a Sync On Demand mode is to reduce the time spent by Fabric performing the LUI sync by synchronizing only the relevant data. In this mode, the sync is performed only on tables that are a part of the executed SELECT statement and their parent tables. The sync follows the standard Sync mechanism rules that are based on a LU predefined sync method and sync mode.
The logic of the Sync On Demand is as follows:
Performing the GET command doesn't trigger the instance synchronization, as the synchronization is done in SYNC OFF mode. If the instance doesn't yet exist in Fabric, a full sync is performed.
When executing the SELECT statement on LU tables, the evaluation is performed whether a sync is required or not. The evaluation is done only for the LU tables and their populations in the SELECT statement and for their parents up to the Root table. The synchronization logic follows the standard Sync mechanism rules that are based on a LU predefined sync method and sync mode.
When executing the SELECT statement on LU business tables, the evaluation is performed on a business table and its parents.
Sync On Demand can run in 2 different modes as follows:
Sync On Demand is also supported when AUTO_MDB_SCOPE is set to true (the 'No Get' mode).
Note that an implementor should manage the transaction efficiently. Thus when a Web Service or GraphIt invokes several SELECT statements on the same LU, it is under the implementor's responsibility to manage the transaction in order to minimize the number of writes into the MDB Storage.
Syntax:
To define a Sync On Demand mode either:
Example 1: Sync On Demand = TRUE
Example 2: Sync On Demand = ALWAYS
Perform GET LUI.
Select from the CASES LU table. As a result:
Select from the CASE_NOTE LU table. As a result:
Example 3: Several SELECTs in a Web Service or GraphIt