Examples of constraint links

These are some examples of constraint links in the topology editor.
Collocation constraint link

The collocation constraint link specifies that the units on each end of the link must be hosted on the same hosting stack. To validate this constraint, the topology editor traverses the units' hosting stacks, following hosting links and realization links to ensure that eventually the same unit is present in both stacks. In the following example, two application components are connected by a collocation constraint link. This constraint link is valid because both units are hosted on the same operating system, even though the path to the operating system goes through other units.

Two components that are connected by a collocation constraint link and hosted on the same hosting stack

Anti-collocation constraint link

The anti-collocation constraint link is the opposite of the collocation constraint link; it is violated if the units are hosted on the same hosting stack.

As with the collocation constraint link, you can provide more detail about the anti-collocation constraint link by specifying a capability type. The anti-collocation constraint is violated only if a unit with the specified capability is present in both units' hosting stacks. For example, you can specify that two units can be on the same piece of hardware but not on the same operating system. The following illustration shows two Web application components that are connected by an anti-collocation constraint link; the constraint specifies the j2ee.ServletContainer capability, allowing the units to be hosted on the same piece of hardware and operating system but not on the same Web server.

Two Web components that are connected by an anti-collocation constraint link. They are hosted on the same piece of hardware but on separate Web servers

Deferred hosting constraint link
Like the collocation constraint link, the deferred hosting constraint link ensures that two units are in the same hosting stack. However, the collocation constraint link is used between peers, such as two applications; the deferred hosting constraint link is used between a host and a hosted unit. In this way, the deferred hosting constraint link specifies that one unit is hosted on another unit, though there may be other units in between them. For example, a Web application may have a deferred hosting constraint link to an operating system unit, indicating that the Web application runs on the operating system, but that there may be other units between the two, such as a Web server. This constraint is violated if the units are not in the same hosting stack, as in this example of a Web server with a deferred hosting constraint link to an operating system that does not host the application's Web server:
A Web component with a deferred hosting constraint link to an operating system unit that is not in its hosting stack
Application communication constraint link
The application communication constraint link indicates that two application units must be able to communicate. Therefore, the hosting stacks of those units must have a network connection or other means of communication. This constraint is most often used in logical models to indicate how computer systems in different locations must be connected. For example, in the following illustration, two components are connected by an application communication constraint link, so the locations on which the components are hosted must have a path of communication, such as a network communication constraint link:
Two components connected by an application communication constraint link, without an accompanying network communication constraint link between their host locations

The application communication constraint link can have child constraints that describe the communication between the units. For example, the application protocol constraint specifies the protocol that is used for the communication, and the communication bandwidth constraint specifies the amount of bandwidth that is used.

Network communication constraint link
This type of constraint link represents a path of communication between two pieces of network infrastructure. The topology editor does not validate network communication constraint links and thus this type of constraint link is never violated. Instead, this type of constraint link plays a part in the validation of application communication constraint links, as described above. Network communication constraint links can also serve as metadata to specify how the parts of computer networks communicate. For example, you can correct the violation in the application communication constraint link example by adding a network communication constraint link between the locations:
Two components connected by an application communication constraint link, with an accompanying network communication constraint link between their host locations

Like the application communication constraint link, the network communication constraint link can have child constraints that describe the communication between the units. For example, the port configuration constraint specifies the port through which the units communicate, and the transmission delay constraint specifies the longest acceptable delay for communication between the units.

Attribute propagation constraint link
The attribute propagation constraint link ensures that two attributes on two separate topology elements are set to the same value. For example, if you want to ensure that two servers are running the same version of Java, you can create an attribute propagation constraint link between the units, specifying the two Java version attributes:
An application server and a Web server unit connected by an attribute propagation constraint link that ensures that their Java container version is the same

Feedback