ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing replications / Log-based replication
  • Overview
  • Implementing log-based replication with WDReplic
  • Steps
  • Important: implementation conditions
  • Implementing log-based replication through programming
  • Important: implementation conditions
  • Precaution
  • Moving the data files manually
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Log-based replication
HFSQL ClassicAvailable only with this kind of connection
Overview
The replication is the operation allowing you to keep updated remote databases of identical structures on which several operations are performed. The operations performed on each one of the databases are applied to all the other databases.
For more details, see The replication.
WINDEV and WEBDEV propose two methods for implementing log-based replication:
  • Using WDReplic. In this case, no specific programming is required. All you have to do is configure the different replication options. This tool (and the necessary configuration files) will have to be installed along with the databases to replicate.
  • Using the WLanguage functions. In this case, the management of the replication will be performed in the application via specific options. These options will use the WLanguage functions for implementing the replication.
Remark: Log-based replication is not available in HFSQL Client/Server. We recommend that you use the universal replication.
Implementing log-based replication with WDReplic

Steps

To implement log-based replication with WDREPLIC, you must:
  1. Modify the analysis (for more details, see Modifying the analysis to support log-based replication).
  2. Create the executable (for a WINDEV application), then the setup procedure.
    Remark: When creating the setup procedure, don't forget to add WDReplic to the setup program.
  3. Install the application (and WDREPLIC) on the master and subscriber sites. The application setup also includes:
    • WDReplic if the replication is performed with this tool
    • an automatic update of the data files. This update is used to log (if necessary) and to replicate the data files. If the files were already logged, the existing logs are cleared.
      Reminder: To implement the replication, the data files must have an identical structure (analysis) on all the computers (master computer and subscriber computers).
  4. Configure WDReplic on the master computer.
  5. Install the files required by WDReplic on the subscriber computers.
For more details, see Help about WDReplic.

Important: implementation conditions

Implementing log-based replication in an application is a major operation.
We recommend that you respect some basic rules.
For each file in replication, we recommend that you use a singe unique key in your files. This unique key must be an "Automatic 8-byte identifier".
Implementing log-based replication through programming
To implement log-based replication through programming, you must:
  1. Modify the analysis (for more details, see Log-based replication: Modifying the analysis).
  2. Modify the application to manage the replication with the WLanguage functions. For more details, see Log-based replication: Program in WLanguage
  3. Create the executable (for a WINDEV application) and the setup program.
  4. Install the application on the master and subscriber sites. The application setup must include an automatic update of the data files. This update is used to log (if necessary) and to configure the data files for the replication. If the files were already logged, the existing logs are cleared.
Reminder: To implement log-based replication, the data files must have an identical structure (analysis) on all the computers (master computer and subscriber computers).

Important: implementation conditions

Implementing log-based replication in an application is a major operation.
We recommend that you respect some basic rules.
For each file in replication, we recommend that you use a singe unique key in your files. This unique key must be an "Automatic 8-byte identifier".
Precaution

Moving the data files manually

Caution: To move the data files manually, you must comply with the following rules:
  1. Update all the replicas on the relevant computers.
  2. Copy the data files to the relevant computers.
  3. Save then delete the following files:
    • all the log files (".JNL" files).
    • all the files of identification tables ("JournalIdentification.*" files).
    • all the files of operation tables ("JournalOpération.*" files).
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help