Deploying a Simple System

Deploying a Simple System

Let's start by showing a deployment diagram of a very simple system. In this simplest of cases, your software will be delivered as a single executable file that will reside on one computer.

To show computer hardware, you use a node, as shown in Figure.

Use nodes to represent hardware in your system

This system contains a single piece of hardwarea Desktop PC. It's labeled with the stereotype <<device>> to specify that this is a hardware node.

One More Time...Model Levels

It must be about time to bring up modeling at the right level again. In Figure, the hardware node is specified as a Desktop PC. It's entirely up to you how much detail you want to give node names. You could be very precise with a name such as "64-bit Processor Intel Workstation," or very general with a name such as "Generic PC."

If you have specific hardware requirements for your system, you're likely to give your nodes very precise names. If your hardware requirements are undefined or insignificant, you might have vague node names. As with all other aspects of UML, it is important to make sure that you are modeling at the right level for your system.

Now, you need to model the software that runs on the hardware. Figure shows a simple software artifact (see "Deployed Software: Artifacts," next), which in this case is just a JAR file named 3dpacman.jar, containing a 3D-Pacman application.

A physical software file such as a jar file is modeled with an artifact

Finally, you need to put these two pieces together to complete the deployment diagram of your system. Draw the artifact inside the node to show that a software artifact is deployed to a hardware node. Figure shows that 3dpacman.jar runs on a Desktop PC.

Drawing an artifact inside a node shows that the artifact is deployed to the node

But is it really complete? Don't you need to model the Java Virtual Machine (JVM) because without it, your code wouldn't execute? What about the operating system; isn't that important? The answer, unfortunately, is possibly.

Your deployment diagrams should contain details about your system that are important to your audience. If it is important to show the hardware, firmware, operating system, runtime environments, or even device drivers of your system, then you should include these in your deployment diagram. As the rest of this chapter will show, deployment diagram notation can be used to model all of these types of things. If there's a feature of your system that's not important, then it's not worth adding it to your diagram since it could easily clutter up or distract from those features of your design that are important.

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows