RADE

Source Code Manager

Multi-site Management

Working with multiple SCM sites

Use Case

Abstract

This article explains how to share components between multiple SCM installations over a W.A.N. (Wide Area Network).


Principles

Nowadays, many enterprises are international enterprises. So, people working on various places in the world must be able to work together, and the developed code has to be accessible and synchronized at any moment, and for people working on the same project, but in different localizations in the world.

SCM is designed for managing in one or several databases the objects produced by developers. When all users are connected over the same L.A.N. (Local Area Network) one single SCM installation is enough to manage all objects: this installation defines one site whatever the number of databases is [1].

When development projects take place over different geographic places, it is needed to install SCM on all places, therefore setting up several SCM sites [2].

If those sites are connected over a W.A.N., SCM provides inter-site commands for replicating objects between them. This set of commands will allow SCM to be used by several teams in different countries, as if they all were in the same site. The process becomes identical between people working in two different sites, at different hours of the day, and people working in the same office. SCM objects are going to be shared by several SCM sites.

This is the aim of those new commands: everybody can work as if they were in the same office, therefore, being able to work on the same products, promoting and synchronizing their data at any moment.

Figure1: around the world

 

[Top]

Global Architecture

Inter-site exchanges involve two types of sites:

Parent and Child Sites (or remote and local sites)

All the workspaces belonging to both sites can be seen as pertaining to the same global workspace tree; data are transferred from one workspace of a site to another workspace of the other site, and in both ways.

Figure 2-1: a global workspace tree

 

 

The local integration transfer workspace o the local site can be seen as being a child workspace of the parent remote workspace and the usual attachment, promotion and synchronization operations that exist within a local workspace tree are replaced here by inter-site commands.

 

Figure 3-1: a global workspace tree after creating a transfer (adl_mk_is_transfer)

 

Considering the "Site 2" as being the transfer initiator, then

on site 1: remote site

on site 2: local site

[Top]

Hardware and Client/server inter-site architecture

The figure 4 shows the hardware architecture, associated to an inter-site transfer. 

Figure 4: Hosts involved in inter-site transfers

 

The inter-site commands are based on a tcp-ip client/server architecture. 

On the parent remote site, a SCM inter-site Transfer Manager has been set up on one host and is waiting on a known port for remote clients to connect.

On the local site, any user might be able to start a transfer by executing the inter-site transfer's commands.

[Top]

Software inter-site architecture: inter-site commands

All the inter-site command's names are composed by the adl suffix, and most of them contain the "is" abbreviation ("is" stands for "inter-site). The others contain the word "transfer".

These commands are used by the local site to manage the inter-site SCM exchanges.

A set of administrator's commands:

A set of user's commands:

The figure 5 shows commands launched in a global workspace tree

Figure 5: commands in a global workspace tree

 

[Top]

Creating an inter-site transfer

The inter-site creation is managed by the adl_mk_is_transfer command. Before creating the transfer, we strongly recommend you to read the following advices.

A transfer is created by the local site administrator, using the adl_mk_is_transfer command. For more details, see the documentation reference of the adl_mk_is_transfer command. The transfer's creation has to be prepared, on the parent remote site as well as on the child local site.

On the parent remote site

On the parent site, called also remote site, a workspace will receive the modification sent from the child workspace. This workspace can be either the root workspace, as well as a project workspace.

The SCM administrator on the parent site has to: 

The user responsible of the parent's workspace has to: 

Here are three samples of a remote site workspace's structure: 

Figure 6-1: architecture first example 

On the child local site

Before launching adl_mk_is_transfer, on the child site, called also local site, the local administrator has to: 

[Top]

Warning: the adl_mk_is_transfer command is a mono-tree command. This means for a multi-tree workspace, you have to:

Once this is done, all the inter-site commands are multi-tree commands.

 

Here are two complete transfer examples. One with a root workspace on the local site, and one with a development workspace on the local site; both transfers are done with a project workspace on the remote site.

Example with a root workspace on the local site

-1-  In the remote site:

                        adl_mk_tree MainRemoteTree -db DatabaseName -cs ContentServerId ...

                        adl_mk_root_ws  RemoteRootWs ...
                        adl_mk_ws RemoteProjectWs -parent_ws RemoteRootWs  ...
                        adl_ch_ws RemoteProjectWs
                        adl_attach Fw1 Fw2 ... -mod

-2- In the remote site:

To create the transfer manager, the following command has to be launched:

                        adl_transfer_mngr -port PortNumber -cmdfile ParametersFile

For more details and content of the parameter file, see the [5] "Getting started" article

 

-3- In the local site:

                        adl_mk_tree LocalTree -db DatabaseName -cs ContentServerId ...

                        adl_mk_root_ws LocalRootWs

                        adl_ch_ws LocalRootWs
                        adl_mk_is_transfer -ws LocalRootWs -r_is_server HostName:PortNumber -r_parent_ws RemoteProjectWs

The transfer's name is not mandatory. A default transfer's name will be given if no transfer name has been chosen.

 

Example with a multitree development workspace on the local site

-1-  In the remote site:

                        adl_mk_tree RemoteTree1 -db DatabaseName -cs ContentServerId ...
                        adl_mk_tree RemoteTree2 -db DatabaseName ...

                        adl_mk_root_ws  RemoteRootWs1 ...
                        adl_mk_ws RemoteProjectWs1 -parent_ws RemoteRootWs1  ...
                        adl_ch_ws RemoteProjectWs1
                        adl_attach Fw1-1 Fw1-2 ... -mod

                        adl_mk_root_ws  RemoteRootWs 2...
                        adl_mk_ws RemoteProjectWs2 -parent_ws RemoteRootWs 2 ...
                        adl_ch_ws RemoteProjectWs1
                        adl_link_ws -parent_ws RemoteRootWs2 -tree RemoteTree2

-2- In the remote site:

To start the transfer manager, the following command has to be launched:

                        adl_transfer_mngr -port PortNumber -cmdfile ParametersFile

For more details, see the [5] "Getting started" article

 

See figure 5 for this example

-3- In the local site:

         ---> local site administrator:      adl_mk_tree LocalTree1 -db DatabaseName -cs ContentServerId ...
                                                       adl_mk_tree LocalTree2 -db DatabaseName -cs ContentServerId ...

         ---> local site administrator:      adl_mk_root_ws LocalDummyRootWs1 -no_image
                                                       adl_mk_root_ws LocalDummyRootWs2 -no_image

---> developer number One:      adl_mk_ws LocalWsOne -tree LocalTree1 -parent_ws LocalProjetcWs -dir ...
                                             adl_link_ws LocalWsOne -parent_ws LocalDummyRootWs2 -all_trees
---> developer number Two:      adl_mk_ws LocalWsTwo -tree LocalTree1 -parent_ws LocalDummyRootWs1 -dir ...
                                             adl_link_ws LocalWsTwo -parent_ws LocalDummyRootWs2 -all_trees

---> local site administrator:     adl_set_ws LocalProjectWs -no_promote_cmd

         ---> local project responsible:    adl_ch_ws LocalProjectWs
                                                       adl_mk_is_transfer -ws LocalProjectWs -r_is_server HostName:PortNumber -r_parent_ws
                                                                                  RemoteProjectWs1 -tree LocalTree1 -no_cr
                                                       adl_link_is_transfer -ws LocalProjectWs -r_parent_ws RemoteProjectWs1 -tree LocalTree2
        

The transfer's name is not mandatory. A default transfer's name will be given if no transfer name has been chosen.

 

Using an inter-site transfer

The user responsible of the child's workspace has to:

Here are two complete transfer examples. One with a root workspace on the local site, and one with a development workspace on the local site; both transfers are done with a project workspace on the remote site.

Example with a root workspace on the local site

-1- In the local site:

                        adl_ch_ws LocalRootWs
                        adl_ls_fw_is -all

                        adl_attach_is Fw1 Fw2 ... -mod

                        adl_sync_is
                        adl_co ...
                        adl_promote_is

 

The user responsible of the parent's workspace has to:

-2- In the remote site:

                        adl_ch_ws RemoteProjectWs
                        adl_collect

 

Example with a multitree development workspace on the local site

-1- In the local site:

         ---> developer number One:      adl_ch_ws LocalWs1
                                                      adl_ls_fw -all
                                                      adl_attach Fw1-1 Fw1-2 ... -mod -tree LocalTree1
         ---> developer number Two:      adl_ch_ws LocalWs2
                                                      adl_ls_fw -all
                                                      adl_attach Fw1-1 Fw1-2 ... -mod -tree LocalTree2

 

The user responsible of the parent's workspace has to:

-2- In the remote site:

                        adl_ch_ws RemoteProjectWs
                        adl_collect

 

[Top]

Short commands reference

Here is an overview of the main commands. For more details, see each command reference.

 adl_mk_is_transfer

adl_mk_is_transfer is the command that allows the local site administrator to define a transfer with a remote site. This command is an administrator command.

For an inter-site transfer, necessary data are:

To launch the command: the administrator will be in the local transfer workspace.

Actions realized by the adl_mk_is_transfer command:

 

adl_ls_fw_is

adl_ls_fw_is is the command that visualizes all the available frameworks for the transfer in the remote parent workspace. Those frameworks are shared between two distant sites, exactly as if they were shared by two persons working in the same team.

 

adl_ls_transfer

adl_ls_transfer is the command that visualizes all the transfers available on a given site. This command is a user command.

 

adl_rm_is_transfer

adl_rm_is_transfer is the command that suppresses the transfer given in parameter, on the current site. This command is an administrator command.

Actions realized by the adl_rm_is_transfer command:

 

adl_set_is_transfer

adl_set_is_transfer is the command that allows the administrator to update parameters of a given transfer, and if necessary, for a given tree. This command is an administrator command.

The parameters that can be updated are:

 

adl_ren_transfer

adl_ren_transfer is the command that allows the administrator to rename the transfer's name. This command is an administrator command.

 

adl_link_is_transfer

adl_link_is_transfer is the command that links a transfer between several trees.

 

adl_attach_is

adl_attach_is is the command that attaches one or several of the available frameworks, so the developers can work on those SCM objects. This command is an user command.

Like for all SCM operations the replication of objects between sites is performed between workspaces and the granularity of exchange is the framework.

 

adl_detach_is

adl_detach_is is the command that detaches one or several of the available frameworks. This command is an user command, and cannot be launched in the root workspace..

 

adl_sync_is

adl_sync_is is the command that allows the user to synchronize the local transfer workspace with his remote parent workspace. All the modifications done in the remote parent workspace will be reported in the local transfer workspace.

Actions realized by the adl_sync_is command:

 

adl_promote_is

adl_promote_is is the command that allows the user to promote all the local modifications done in the local workspace, to his remote parent workspace.

Actions realized by the adl_promote_is command:

 

adl_solve_merge_is

adl_solve_merge_is is the command that resolves the merges if necessary, between the objects, if they have been modified concurrently in the remote workspace, and in the local workspace. This command must be launched in the local workspace.

This command will be necessary if there is a conflict between the remote mirror workspace and the local root workspace. Here are two cases that can happen:

- Case 1 -

The adl_solve_merge_is command downloads the objects in the local workspace, resolves the merge, then sends immediately the result in the mirror workspace.

- Case 2 -

The adl_solve_merge_is has to be launched in the local workspace.

 

Handling Concurrent Changes

Like across workspaces belonging to the same site, concurrent changes may happen when sharing components between sites. 

There are two kind of concurrent changes: 

The first kind of concurrent changes is automatically managed by SCM commands and there is no particular action to be done when sharing components.

The second kind of concurrent changes lead to solving merges [6] when the conflicting changes come in the same workspace. When sharing components, the solving of merges occurs always in the child site transfer workspace. When they occur, the user has to solve them all before being able to continue the transfer.

In fact the way data are exchanged between sites follow the same (default) rules as between parent and child workspaces on one site:

  1. the child workspace synchronizes itself against the contents of the parent workspace
  2. the synchronization may lead to some merges that must be solved in the child workspace
  3. once all merges are solved, the child workspace is allowed to promote its changes to the parent workspace

[Top]

Advices - Recommendations

Workspaces

Here are some rules and advices to follow to take full benefits of the transfer capabilities:

Frameworks

Here are the steps to go through before being able to share components between sites.

[Top]


In Short

Sharing components between sites consists in using the adl_is_xxx commands which establishes a connection with the SCM inter-site and shares data between different sites. Exchanges are done between usual SCM workspaces. The user who runs those commands is responsible for solving any conflicting change between the two sites.

[Top]


References

[1] Multiple databases
[2] Defining a site
[3] The SCM Multi-site Transfer Manager
[4] The Custom Checker Library
[5] Getting started
{6] Merging Concurrent Changes
[Top]

History

Version: 4 [August 2002] Document update
Version: 3 [June 2002] Document update: insert more examples
Version: 2 [May 2002] Document update: integrating the inter-site transfer use
Version: 1 [Nov 2001] Document created
[Top]

Copyright © 2001, Dassault Systèmes. All rights reserved.