[INFO] How Github mappings two way synchronization works - dbpedia/mappings-ui GitHub Wiki

The Mappings UI has a mechanism to keep a two-way synchronization between the RML mappings stored in its database and the mappings in a Github repository.

The repository url, branch, folder and update frequency can be set in the config.js file stored in the root of the project.

Initial synchronization

When a new github repository is set, data from the UI database and such repository is merged, with the Github data having priority. Note that, in order to work properly, whenever a new github repository is set, the local folder of the old one has to be manually deleted before running the server.

Conflict behaviour

Whenever there is any conflict (a change from the UI and a change from Github), the change from the UI is archived as an old mapping version, and the Github change is reflected as the active version.

Panic management

It may be the case that the github update process hangs, or is killed by the OS. In that case, when running again, the local repository folder will be deleted, the repository will be cloned again and the documents in it will be imported to the DB. This is to avoid having inconsistent repositories.