Skip to content

Install operations

DataSync provides different app-services to perform the setup or update processes of its domain models:

  • Application: represents the ITsynch product to replicate.
  • Site: A physical installation where an Application is installed.
  • Table: information about a table of the database.
  • Column: information about a column of certain Table.
  • ColumnReference: represents the relation between two Columns, given through a foreign key constraint.

Install Sites

This process is called from the Sites app-service end-point and creates Sites based on the Installations obtained from the Gathering abstraction.

Install Sites endpoint

When running this process for the first time it will set the current site as Hub and all the other ones as Satellites. This process can be executed any number of times and will not create a duplicated Sites.

Important

This process must be executed in the site desired to be marked as Hub.

Info

Once a Satellite has been initialized, running this end-point on that Site will have no effects. If DataSync has any Site registered on it's database it will make sure to only allow to re-execute this process in the Hub.

Install Applications

This process is called from the Application app-service end-point and creates a new Application in DataSync by following the steps below:

Install Applications endpoint

  1. Reads all the new template files in the configured directory and validates their format (any template with an application code and version already installed will be ignored).
  2. Obtains any needed data from the Gathering abstraction.
  3. Connects to the databases involved, reads their schema and creates the corresponding Tables, Columns and ColumnReferences from that data.
  4. Validates each RuleTemplate against the Tables and Columns and creates the corresponding Rule.
  5. Finally creates the new Application, adding the connection strings along with the domain models previously created.

When a new template is created, you must run this process to create the new Application

Application update

This process is also called from the Application app-service, which makes changes on an existing Application by following the steps below:

  1. Reads the template file for the provided application Id and version.
  2. Sets all the current rules of the application as inactive and creates new ones based on the template.

Important

This process will not make any update on the models related to the schema. If the schema of the database has changed you will need to define a new version of the template for your application and perform a setup.