Professional Documents
Culture Documents
SDA - Lab 5 - 2k22
SDA - Lab 5 - 2k22
Laboratory # 05
9/26/2023
UET TAXILA
Engr. Sidra Shafi
All UML diagrams can be useful to describe aspects of the architectural model. Four UML
diagrams are particularly suitable for architecture modeling:
• Package diagrams
• Subsystem diagrams
• Component diagrams
• Deployment diagrams
Deployment Diagram:
Deployment Diagram shows execution architecture of systems that represent the assignment
(deployment) of software artifacts to deployment targets (usually nodes).
Nodes represent either hardware devices or software execution environments. They could be
connected through communication paths to create network systems of arbitrary
complexity. Artifacts represent concrete elements in the physical world that are the result of a
development process and are deployed on nodes.
Both the deployment diagram and the component diagram are closely interrelated to each other as
they focus on software and hardware components. The component diagram represents the
components of a system, whereas the deployment diagram describes how they are deployed on the
hardware.
The deployment diagram does not focus on the logical components of the system, but it put its
attention on the hardware topology.
The deployment diagram portrays the deployment view of the system. It helps in visualizing the
topological view of a system. It incorporates nodes, which are physical hardware. The nodes are
used to execute the artifacts. The instances of artifacts can be deployed on the instances of nodes.
One of the essential elements of the deployment diagram is the nodes and artifacts. So it is
necessary to identify all of the nodes and the relationship between them. It becomes easier to
develop a deployment diagram if all of the nodes, artifacts, and their relationship is already known.
1. Have you identified the scope of your system? For example, you should know
whether you are diagramming a single application or the deployment to a whole network
of computers.
2. What are the limitations of your physical hardware? What legacy systems will you
need to interact with? Make sure that you know the operating software and protocols
you will be working with and what monitoring you will be putting into place.
4. Do you have all the nodes you need? Do you know how they are all connected?
• Artifact: Aproduct developed by the software, symbolized by a rectangle with the name
and the word “artifact” enclosed by double arrows.
• Dependency: A dashed line that ends in an arrow, which indicates that one node or
component is dependent on another.
➢ There are two types of nodes in a deployment diagram: device nodes and execution
environment nodes. Device nodes are computing resources with processing
capabilities and the ability to execute programs. Some examples of device nodes
include PCs, laptops, and mobile phones.
• Package: A file-shaped box that groups together all the device nodes to encapsulate the
entire deployment.
Example:
You may notice that the diagram shows two ways to indicate an artifact’s dependency on a
component. For the ReservationLogic artifact, the component dependency is shown as a
property {component = Reservations Business Logic}. For the Persistence.jar artifact, the
dependency is shown with a dashed line and an arrow pointing to the PersistentStore component.
Node as a Container:
A node can contain other elements, such as components or artifacts. The following diagram shows
a deployment diagram for part of an embedded system, depicting an executable artifact as being
contained by the motherboard node.
Just as an execution environment (or another hardware node) can be nested within a hardware
node, so can one execution environment be nested within another. In the diagram below, for
example, the «web server» execution environment is nested within the «OS» execution
environment (note that in both execution environment nodes, the «execution
environment» stereotype has been substituted by an application-specific stereotype).
In the example above, the device node could represent any number of Dell PowerEdge servers,
each running the Linux operating system and playing host to Apache web server software. The
example below shows a specific instance of Apache running over a specific instance of Linux
installed on a specific server called WebServer1.
Communication Path:
Nodes may be connected to other nodes via associations that represent communication paths,
indicating that communication may take place between the nodes.
A communication path may exist, for example, between a hardware node representing an
application server and another hardware node that represents a client workstation. A
communication path is drawn as a solid line connecting two nodes. The type of communication
being modeled can be shown using an appropriate stereotype.
In the example below, the model describes a desktop computer communicating with an intranet
server over an Ethernet connection. Note, however, that communication paths can also represent
wireless connections. We can use hardware nodes and the communication paths between them to
model the topology of a network.
A communication path can also be used to show that communication may take place between
execution environment nodes. The stereotype used for a communication path should reflect the
type of communication we are interested in modeling. In the example below, the association is
stereotyped as a TCP/IP connection. Although the data will obviously be transmitted via some
physical transmission medium, such as an Ethernet connection, we are interested here in the
communication between two execution environments. In this case, the execution environments
happen to be a web browser and a web server, which requires the use of the TCP/IP protocols.
• Package
• Node
• NodeInstance
• Artifact
• Port
• Part
• Association
• DirectedAssociation
• Dependency
• Link
• Connector
Package:
A package is a grouping of model elements. Packages themselves may be nested within other
packages. A package may contain subordinate packages as well as other kinds of model elements.
All kinds of UML model elements can be organized into packages.
A node is a run-time physical object that represents a computational resource, generally having at
least a memory and often processing capability as well, and upon which components may be
deployed.
2. Click at the position where Node will be placed in the [main window].
3. Then node is created and the quick dialog appears. Enter the node name at the quick
dialog.
4. At the [Select a Artifact] dialog, select a deployed artifact and click [OK] button.
5. Then the artifact is add to the node and the node is shown as following.
2. Click the node where the port will be contained in the [main window].
3. A port is created on the node and the quick dialog appears. Enter the port name at the
quick dialog.
2. Click the node where the part will be contained in the [main window].
2. Drag from one part and drop to the other part in the [main window].
Node Instance:
A node instance is an instance of a node. A collection of component instances may reside on the
node instance. An instance can be distinguished from a node by the fact that its name is underlined
and has a colon before its base node type. An instance may or may not have a name before the
colon. The following diagram shows a named instance of a computer.
2. Click at the position where NodeInstance will be placed in the [main window], a node is
created, and quick dialog appears.
3. Enter the node instance name at the quick dialog and press [Enter] key.
Artifact:
An Artifact represents a physical piece of information that is used or produced by a software
development process. Examples of Artifacts include models, source files, scripts, and binary
executable files. An Artifact may constitute the implementation of a deployable component.
To create Artifact,
2. Click at the position where Artifact will be placed in the [main window].
3. At the quick dialog, enter the artifact name and press [Enter] key.
4. The result is as follows.
To create association,
2. Drag from one associated and drop to another in the [main window].
Dependency:
Procedure for creating dependency
To create dependency,
Link:
Procedure for creating link
2. Drag from one NodeInstance and drop to the other NodeInstance in the [main window].
*****************