5.2 NodesA node is a resource that is available during execution time. (Nodes were mentioned in Chapter 2.) Traditionally, nodes refer to computers on a network, but in the UML a node may be a computer, printer, server, Internet, or any other kind of resource available to components. For example, the project management system may be deployed on the following nodes:
Nodes follow the type-instance dichotomy first discussed in Chapter 2 and applied to classes and objects in Chapter 3. You can use the UML to talk about classes of nodes, as well as specific nodes of a class. When speaking of a class of nodes, it's customary to use the terms node or node class. Thus, while you might think of a node as a specific thing, in the UML, a node really represents a class of nodes. When speaking of a specific component of a class, use the term node instance. A node is available during execution time and is a resource on which components may execute. In the UML, a node is shown as a three-dimensional rectangle labeled with the node's name. Figure 5-3 shows various nodes associated with the project management system, including a desktop client, business-processing server, database server, and printer node. Figure 5-3. Nodes used by the project management systemA node instance is a specific node. For example, specific nodes used by the project management system include:
A node instance is shown similarly to a node class but labeled with the node instance name followed by a colon followed by the node class name, all fully underlined. Both names are optional, and the colon is present only if the node class name is specified. Figure 5-4 shows various node instances of the node classes in Figure 5-3, including two desktop client node instances, named Jonathan's Computer and Andy's Computer, two business-processing node instances, named Group Server and Enterprise Server, a printer node instance, named Group Printer, and a database server node instance. Figure 5-4. Node instances |