You are on page 1of 10

HOUR 13

Working with Deployment


Diagrams

What You’ll Learn in This Hour:


. What a deployment diagram is
. Applying deployment diagrams
. Deployment diagrams in the big picture of the UML

So far, you’ve stayed mainly in the conceptual realm, turning in the last hour to
models of software components. Now you will look at the hardware. As you can see,
the focus has moved from items (like classes) that live in analyses, to software com-
ponents, to hardware that lives in the real world.

Hardware, of course, is a prime topic in a multicomponent system. In today’s world


of computing, a system is likely to encompass numerous types of platforms in far-
flung locations. A solid blueprint for setting up the hardware is essential to system
design. The UML provides you with symbols for creating a clear picture of how the
final hardware setup should look, along with the items that reside on the hardware.

What Is a Deployment Diagram?


A deployment diagram shows how artifacts (which you met in Hour 12, “Working
with Component Diagrams”) are deployed on system hardware, and how the pieces
of hardware connect to one another. The main hardware item is a node, a generic
name for a computing resource.

In UML 1.x, many modelers (including me) distinguished between two types of nodes—a
processor (a node that can execute a component) and a device (a peripheral piece of
hardware that doesn’t execute components but typically interfaces in some way with the
outside world). Although that distinction wasn’t formalized in UML 1.x, it was useful.
214 Hour 13

UML 2.0 now formally defines a device as a node that executes artifacts.
(Remember from Hour 12 that an executable is now classified as an artifact).

In UML 2.0 a cube represents a node (as was the case in UML 1.x). You supply a
name for the node, and you can add the keyword «Device», although it’s usually
not necessary. I still think it’s a good idea to distinguish between devices and
peripherals, as you’ll see. Figure 13.1 shows a node.

FIGURE 13.1
Representing a
node in the UML.
«Device»

DBServer

Figure 13.2 shows three ways to model the artifacts deployed on a node.

FIGURE 13.2
Three ways to
model the DBServer DBServer
deployment of
artifacts on a Corporate Phone Directory
node.
Search Program «artifact» «artifact» «artifact»
Corporate Phone Search Program Search Results
Directory
Search Results

DBServer

«Deploy» «Deploy» «Deploy»

«artifact» «artifact» «artifact»


Corporate Phone Search Program Search Results
Directory
Working with Deployment Diagrams 215

A line joining two cubes represents a connection between two nodes. Bear in
mind that a connection isn’t necessarily a piece of wire or cable. You can also rep-
resent wireless connections, such as infrared and satellite. Figure 13.3 shows an
example of an internode connection.

FIGURE 13.3
Representing the
connection
between nodes.

DBServer

«artifact» «artifact» «artifact»


Corporate Phone Search Program Search Results
Directory

Client

«artifact»
Presentation
Program

UML 2.0’s emphasis on artifacts brings a set of new artifact-related concepts. One
of these concepts is the deployment specification, an artifact that provides
parameters for another artifact. A good example of this is the initialization com-
mand that some modem connections require. This is a string of characters that
sets values for certain characteristics of the modem. Figure 13.4 shows how to
model a deployment specification.

FIGURE 13.4
Representing a
«deployment spec» «artifact» deployment
Initialization Modem Connection
Command specification and
its relationship
with an artifact it
parameterizes.
216 Hour 13

For clarity, one could add the keyword «parameterize» to the arrow, although
this keyword doesn’t come with UML 2.0—that is, it’s not part of the UML
specification.

Applying Deployment Diagrams


A good place to start is with a home computer system, so the first example is a
deployment diagram of the system I used to write this book.

As I said earlier, however, today’s multiprocessor systems might connect nodes


that live far away from each other. To round out the picture, then, you’ll also look
at examples of deployment diagrams applied to networks. I’ll include examples
you might find useful and adaptable to your own work. Each example includes
constraints that reflect the rules of the particular network.

A Home System
In modeling my home system, I’ve included the devices, and I’ve used the node
symbol to also represent peripherals. As I said earlier, the device-peripheral dis-
tinction is a useful one, and this is an example.

The way I used the node in this context is what UML 2.0 refers to as a nonnorma-
tive usage of the node. In UML 2.0, a node, strictly speaking, represents a piece of
hardware that can compute. Because systems involve peripherals, it seems rea-
sonable to include those peripherals in models. In order to distinguish peripherals
from devices, one could add «peripheral» to each nonnormative node, but once
again this is not a keyword built into UML. The nonnormative node’s name (I
love the alliteration) would most likely supply enough information to make that
keyword unnecessary.

Figure 13.5 presents the deployment diagram. I modeled the broadband connec-
tion with my Internet service provider and their connection to the Internet. The
cloud that represents the Internet and the lightning bolt that represents a wireless
connection are not in the UML symbol set, but they’re useful for clarifying the
model. (I’ll discuss this kind of symbol usage in Hour 14, “Understanding
Packages and Foundations.”)

A Token-Ring Network
In a token-ring network, computers equipped with network interface cards
(NICs) connect to a central multistation access unit (MSAU). Multiple MSAUs
Working with Deployment Diagrams 217

are connected together in a series that looks like a ring (hence the ring part of the
name). The ring of MSAUs combines to act as a traffic cop, using a signal called a
token to let each computer know when it can transmit information (hence, the
token part of the name).

FIGURE 13.5
Deployment
Internet diagram of my
home system.

ISP Server
comcast.net

Cable Connection Computer Renaissance


Athlon 1600 XP + PC

RCA DCM315R
Cable Modem
«artifact» «artifact»
MS Word IE 6.0

Netgear MR814
WirelessRouter

802.11b
Wireless
Connection

Netgear MA401 Compaq Presario 1510


Wireless PC Laptop PC
card

When a computer gets the token, only that computer’s information can go to the
network. After it is sent, the information travels to its destination. When the infor-
mation reaches its destination, an acknowledgement can go back to the computer
that sent it.

In this example, shown in Figure 13.6, I’ve modeled a network that consists of
three MSAUs and their respective computers.
218 Hour 13

FIGURE 13.6 Each MSAU has a Ring In (RI)


Deployment port and a Ring Out (RO) port.
diagram for a MSAU-to-MSAU connection is
token-ring network PC RI to RO.
PC
that consists of
three MSAUs.

{Maximum Distance = 85 ft}

MSAU PC

{Maximum Distance = 150 ft}

MSAU

MSAU

PC PC

ARCnet
Like a token-ring network, an ARCnet (Attached Resources Computing
network) involves passing a token from computer to computer. The difference is
that in an ARCnet, each computer has an assigned number. This number deter-
mines the order in which the computers get the token. Each computer connects to
a hub, which is either active (amplifies incoming information before passing it
on) or passive (passes information without amplifying it).

Unlike the MSAUs in a token-ring network, ARCnet hubs don’t move the token
around in a ring. The computers really do pass the token to one another.

Figure 13.7 models an ARCnet with a passive hub, an active hub, and several
computers.

Thin Ethernet
The thin ethernet is a popular type of network. Computers connect to a network
cable via connection devices called T-connectors. One network segment may join
another via a repeater, a device that amplifies a signal before passing it on.
Working with Deployment Diagrams 219

FIGURE 13.7
Deployment
PC PC diagram of an
#4 #5 ARCnet.

{Maximum Distance = 100 ft}


Passive Hub

{Maximum Distance = 100 ft}

Active Hub

{Maximum Distance = 2000 ft}

PC
#3
RG-62U
PC
#2

PC
#1

Figure 13.8 models a thin ethernet network.

The Ricochet Wireless Network


Ricochet Networks, Inc. provides a wireless modem solution for mobile Internet
access. Its wireless modem plugs into a computer’s serial port and broadcasts to
Ricochet’s proprietary network.

The Ricochet network consists of radio transmitter-receivers, each about the size of
a shoebox. These microcell radios are mounted on top of streetlights a quarter- to
a half-mile apart, arranged in a checkerboard pattern. Equipped with a special
adapter, each microcell radio draws a small amount of power from its streetlight.

The microcell radios broadcast signals to Wired Access Points that move the informa-
tion to a Network Interconnection Facility (NIF). The NIF consists of a name server
(a database that validates connections), a router (a device for linking networks
together), and a gateway (a device for translating information from one communica-
tions protocol to another). Information then moves from the NIF to the Internet.
220 Hour 13

FIGURE 13.8
Deployment
Terminator
diagram of a thin
ethernet network.

PC
T-Connector

{Maximum Length = 1.6 ft}


T-Connector PC

RG-58/AU

T-Connector

Repeater
Terminator

Terminator

T-Connector

PC

T-Connector

PC
T-Connector

Terminator

Available only in Denver and San Diego at this writing, Ricochet technology pro-
vides a nice modeling opportunity. Figure 13.9 shows the deployment diagram for
this network.
Working with Deployment Diagrams 221

FIGURE 13.9
The Ricochet
Receives signals Internet Wireless Network.
from about 100
transceivers

Microcell Transceivers Wired Router Name Server Gateway


Access T1 Frame-Relay
are mounted on
streetlights Point

Network Interconnection Facility


Broadcast

Microcell Transceiver

Broadcast

Wireless Modem

Direct Plug-In to
Serial Port

Laptop PC

Deployment Diagrams in the Big Picture


You’ve come to the end of the UML diagram set. The big picture (Figure 13.10)
includes the node and the artifact and is now complete.

Summary
The UML deployment diagram provides a picture of how the physical system will
look when it’s all put together. A system consists of nodes, with each node repre-
sented by a cube. A line joining two cubes symbolizes a connection between two
nodes. You can show the artifacts that reside on each node.

As you might imagine, deployment diagrams are useful for modeling networks.
Models presented in this hour include token-ring networks, ARCnet, thin ethernet,
and the Ricochet Wireless Network.
222 Hour 13

FIGURE 13.10 Structural Elements Behavioral Elements


Your big picture of
the UML includes State
Class
Interface
the deployment
Node
diagram symbols
and is complete. Use case

Actor :Name1 :Name2

Component «component»
Component (2.0) «artifact»
(1.x)

Relationships
Sequence
Association
Generalization
:Name1 1: Message()
Dependency
Realization :Name2

Grouping Extension Communication

«Stereotype»
Package {Constraint}

Annotation

Note Activity

You might also like