Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 11: Deployment View

In this chapter, we'll examine the final view of Rose, the Deployment view. The Deployment view is concerned with the physical deployment of the application. This includes issues such as the network layout and the location of the components on the network. We'll also consider deployment issues such as how much network bandwidth we have, how many concurrent users we can expect, what we do if a server goes down, and so on.

The Deployment view contains processors, devices, processes, and connections between processors and devices. All of this information is diagrammed on a Deployment diagram. There is only one Deployment diagram per system, and therefore one Deployment diagram per Rose model.

Creating and using a Deployment diagram

Adding processors

Adding devices

Adding connections

Adding processes

Deployment Diagrams

A Deployment diagram shows all of the nodes on the network, the connections between them, and the processes that will run on each one. Figure 11.1 is an example of a Deployment diagram.

Figure 11.1: Deployment diagram for the airline system

Opening the Deployment Diagram

In Rose, the Deployment diagram is created in the Deployment view. Because there is only one diagram, it isn't shown in the browser as a package. To access the Deployment diagram, you need to use the browser.

To open the Deployment diagram:

1.

381

Chapter 11: Deployment View

Double−click Deployment View entry in the browser.

2.

Rose will open the Deployment diagram for the model.

In the following sections, we'll examine each piece of this diagram.

Adding Processors

A processor is any machine that has processing power. The servers, workstations, and other machines with processors are included in this category.

In UML, processors are displayed with this symbol:

To add a processor:

1.

Select Processor from the toolbox.

2.

Click the Deployment diagram to place the processor.

3.

Enter the name of the processor.

OR

1.

Select Tools → Create → Processor.

2.

Click the Deployment diagram to place the processor.

3.

Enter the name of the processor.

OR

1.

Right−click the Deployment view in the browser.

2.

Select New → Processor from the pop−up menu.

3.

382

Chapter 11: Deployment View

Enter the name of the processor.

To add documentation to a processor:

1.

Right−click the desired processor.

2.

Select Open Specification from the pop−up menu. This opens the processor's specification window.

3.

Select the General tab.

4.

Enter documentation in the Documentation field.

OR

1.

Double−click the desired processor. This opens the processor's specification window.

2.

Select the General tab.

3.

Enter documentation in the Documentation field.

OR

1.

Select the desired processor.

2.

Select Browse → Specification. This opens the processor's specification window.

3.

Select the General tab.

4.

Enter documentation in the Documentation field.

OR

1.

Select the desired processor.

2.

Enter documentation in the documentation window.

To delete a processor from the diagram only:

1.

383

Chapter 11: Deployment View

Select the processor in the diagram.

2.

Press Delete.

OR

1.

Select the processor in the diagram.

2.

Select Edit → Delete.

Note Note that the processor has been removed from the diagram, but still exists in the browser. To delete a processor from the model:

1.

Select the processor on the Deployment diagram.

2.

Select Edit → Delete from Model, or press Ctrl−D.

OR

1.

Right−click the processor in the browser.

2.

Select Delete from the shortcut menu.

Note Rose will remove the processor from the Deployment diagram, as well as from the browser.

Adding Processor Details

In the processor specification window, you can add information about the processor's stereotype, characteristics, and scheduling.

The stereotype, as with other model elements, is used to classify the processor. For example, you may have some Unix machines and some PC machines. You may want to define stereotypes to differentiate between the two.

A processor's characteristics are physical descriptions of the processor. For example, these could include the processor's speed or amount of memory.

The Scheduling field documents the type of process scheduling used by the processor. The options are as follows:

Preemptive Indicates that high−priority processes can preempt lower−priority processes.

Non−preemptive Indicates that the processes have no priority. The current process executes until it is finished, at which time the next process begins.

384

Chapter 11: Deployment View

Cyclic Indicates the control cycles between the processes; each process is given a set amount of time to execute, and then control passes to the next process.

Executive Indicates that there is some sort of computational algorithm that controls the scheduling.

Manual Indicates that the processes are scheduled by the user.

To assign a stereotype:

1.

Open the desired processor's specification window.

2.

Select the General tab, as shown in Figure 11.2.

Figure 11.2: Entering a processor stereotype

3.

Enter the stereotype in the Stereotype field.

OR

1.

Select the desired processor.

2.

Type the stereotype within double−angle brackets: << Name >>.

To add characteristics to a processor:

 

1.

385

Chapter 11: Deployment View

Open the desired processor's specification window.

2.

Select the Detail tab, as shown in Figure 11.3.

Figure 11.3: Entering processor characteristics

3.

Enter the characteristics in the Characteristics field.

To set scheduling for a processor:

1.

Open the desired processor's specification window.

2.

Select the Detail tab.

3.

Select one of the following for scheduling: Preemptive, Non−preemptive, Cyclic, Executive, or Manual.

To show scheduling on the diagram:

1.

Right−click the desired processor.

2.

Select Show Scheduling from the pop−up menu.

386