Nodes in UML models

In UML models, nodes are model elements that represent the computational resources of a system, such as personal computers, sensors, printing devices, or servers. Nodes can be connected by communication paths to describe network structures.

Nodes can contain other nodes, called nested nodes, and they can also have artifacts deployed on them.

Typically, a node has a name that describes the piece of hardware that it represents.

As the following figure illustrates, a node is displayed as a 3-dimensional rectangle that contains the name of the node and the node icon.

A node model element named Node1.

In diagrams, compartments display information about the attributes, deployed elements, nested nodes, and internal structure of the node.

When you develop software for a distributed system, you can model the different components of the system as nodes in a deployment diagram. For example, an e-commerce application might have some software that runs on the client's computer and some that runs on a public server. These different computer systems are represented by nodes. The artifacts that each node deploys can be listed in the Deploy compartment or shown explicitly with deployment relationships.

As the following figure illustrates, you can model the client/server system with two nodes that are connected by a communication path.

A Client node is connected by a communication path to a Server node.

Stereotyped nodes

A node can be stereotyped to represent a specific type of hardware. Assigning a stereotype to a node and replaces the default cube shape with a shape that resembles the system component. For example, the following figure shows how a node is stereotyped to represent a mainframe computer.

The image shows a line drawing of a mainframe computer.

As the following figure illustrates, you can model the same client/server system, which has two stereotyped nodes that are connected by a communication path, by using shapes that represent the specific system components.

A stereotyped node representing a Client PC is connected to a stereotyped node named Database Server.