OpenWGA 7.10 - OpenWGA Concepts and Features

Administration » Features » Jobs » Task types

Content Store Synchronisation

This task is only available to the OpenWGA Enterprise Edition.

The Content Store Synchronisation is used to synchronize the state of two OpenWGA content stores. This is typically used to transport the data of an authoring system to a publishing system.

The synchronisation differs from the migration in that it is able to perform "incremental updates". It stores the status of last synchronisation and is able to determine changes of the source database since then. It then only transports those recent changes to the target. So it is intended to be run multiple times between the same databases, mostly on a scheduled base.

The following aspects should be known and considered when using Content Store Synchronisation:

  • When synchronizing between databases that are published on separate OpenWGA runtimes you need to choose which of these runtimes should peform the synchronisation. This systems needs direct access to both source and target database and needs to connect both as web applications. Ideally the target system is used because the handling of the publishing cache can be performed there more effective. However using the source system is also possible, but changes on the target system will then be visible with some delay.
  • The following data is not synchronized:
    • Draft or archived versions of the content store
    • Workflow definitions
    • The access control list
  • While synchronisation runs the target system may display "inbetween" states of the changing data. If your target system supports this you can enable "transactional synchronisation" where all synchronizing is done in one large transaction. To enable this enable optional setting "Perform whole synchronisation in a transaction" on the synchronisation task.

Setting up synchronisation

First step to setup a synchronisation is to simply create a Job that contains a task of type "Content Store Synchronisation". Here you specify source and target database of the synchronisation. Note again that the OpenWGA system that performs the synchronisation needs both databases to be connected as web applications, even if it does not use one of them for more than synchronisation.

In any case the target database should be completely empty when initializing the synchronisation.

Now you need to decided how to initialize the data in the target database. The simplest way is to just let the synchronisation job run the first time. OpenWGA will then copy the whole data set of the source to the target. This is a perfectly valid procedure but may take a long time depending on the amount of data to copy.

If your source and target database are on the same database platform you instead may have more effective ways to transport the source data to the target on your database server platform, for example via a native database dump of your source database that you can import to your target database. The problem with this approach is to let OpenWGA know about the identical states of source and target once this is done, so it can continue doing incremental updates.

This however can be accomplished following this procedure, which you should start before transporting the data:

  • Setup the synchronisation task with your source and target database in OpenWGA admin client
  • Open Menu "Jobs" > "Content Synchronisations"
  • Here click your just configured synchronisation job and on the details the synchronisation task that you want to initialize
  • Click the button "Download source revision state". This will offer you a link to download a revision state file. Store this file locally.
  • Now transport the data from source to target database via your chosen native database functionality
  • Reconnect your target application in OpenWGA. Open Menu "Web Applications", click your app and click the button "Reconnect" on it.
  • Return to the "Content Synchronisations" view and there to the synchronising task to initialize. Now click the button "Upload synchronisation state".
  • Now upload the revision file downloaded before via the shown upload control
You source and target database now have the same state and the synchronisation can be run to process source updates done since downloading the revision state file.

The "Content Synchronisations" view

Especially form Content Store Synchronisations the OpenWGA admin client of the Enterprise Edition features a separate view under Menu "Jobs" > "Content Synchronisations":

screenshot_99(019).png

This view lists all jobs that contain synchronisation tasks. It is most useful to determine the state of each synchronisation. Click an individual job row to see details of the contained synchronisations.

The "Source state" column shows the date of the last data change performed on the source database. The "Synchronized state" shows the date of the last source modification that was synchronized to the target. So the difference between both dates is the time in which changes are yet unsynchronized.

Invalid synchronisation states

If the synchronisation is performed between two content stores where the target content store already contains data, but the synchronisation state is not known, then the Content Store Synchronisation will fail because of an "invalid synchronisation state".

This may be the case if you initialized the target database with some native database dump or by migration. The synchronisation normally stores the synchronisation state into the target database. If it does not find it, it will only continue if the target database is empty, which in that case it is not.

There are some ways to resolve this situation, dependent on the real state of the target database:

If you know the target database to be in the same state as the source database you may manually set the synchronisation state on the target. Do the following:

  • Open the OpenWGA admin client, Menu "Jobs" > "Content Synchronisations"
  • Click the synchronisation job there and select the synchronisation task from the list that syncs your source and target database
  • Click button "Download source revision state". You will be offered a link by which you can download a "revision state file" from the source database of the selected synchronisation. Store this file locally.
  • Click button "Upload synchronisation state". Now upload the revision state file via the file upload control offered now. This revision will now be stored to the target database as the synchronisation state.

After this procedure you will be able to continue synchronizing.

If the target database has some older state of the source database then there are effectively two options. One option would be to clear the target database and let the synchronisation initialize it again completely. Another one would be to enable the optional setting "Full database comparison". This is a rather exhaustive mode where the synchronisation performs a complete comparison between source and target state. The downside of this mode is that it needs a lot of system memory dependent on the data that is compared. With large data and low memory this mode may fail.