Execution Architecture Soware Architecture VO (706.706) Roman Kern Version 2.1.3 Institute for Interactive Systems and Data Science, Graz University of Technology 1 Outline Definition Initial Design Stereotypes Detailed Design Behaviour 2 Definition Execution View • Focuses on the system runtime structure • Hardware elements, subsystems, processes and threads • Suited for examining quality aributes, most-notably runtime aributes • e.g., performance, security, usability, … • But also e.g., scalability • Similarly to conceptual architecture comprised of components and connectors 3 # The execution architecture focuses on runtime structures and addresses runtime aributes. # Noteworthy exceptions are for instance, quality aributes like maintain- ability, which suers if there is a complex runtime structure.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Execution Architecture
So�ware Architecture VO (706.706)
Roman Kern
Version 2.1.3
Institute for Interactive Systems and Data Science, Graz University of Technology
1
Outline
Definition
Initial Design
Stereotypes
Detailed Design
Behaviour
2
Definition
Execution View
• Focuses on the system runtime structure
• Hardware elements, subsystems, processes and threads
• Suited for examining quality a�ributes, most-notably runtime a�ributes• e.g., performance, security, usability, …• But also e.g., scalability
• Similarly to conceptual architecture comprised of components and connectors
3
# The execution architecture focuses on runtime structures and addressesruntime a�ributes.# Noteworthy exceptions are for instance, quality a�ributes likemaintain-ability, which su�ers if there is a complex runtime structure.
Components in execution architecture
• Concurrent components (abstraction created by execution of a so�ware program)
• If the system is a single-computer, single-process, single-thread system then theexecution architecture is very simple
Figure 1: The simplest execution architecture
4
# One would expect such design for simple command line tools.
Components in execution architecture
• Thus, execution architecture is needed for distributed, concurrent systems
• Nowadays, huge majority of systems comes into this category• e.g., network-based systems• e.g., multi-processor systems (multi-core), sometimes abstraction through OS• e.g., multi-threaded systems - GUI systems belong here as well (event-thread)
5
# Today the majority of (non-trivial) systems is designed to run on multi-core, multi-threaded architectures.# e.g., for CPU benchmarks the single thread performance is increasinglyless important.
Granularity in execution architecture
Level of abstraction�
Typically, we have multiple execution models depending on granularity
6
# So, in practice we have multiple architecture diagram with varying levelsof abstract and detail level.
Components in execution architecture
Components
• Hardware - only boundaries
• Concurrent subsystems - complex components with their own runtime structure,e.g., a database system
• Processes - an OS process, runs on a single computer and has its own memory space
• Threads - an OS thread - executes concurrently with other threads within thememory space of a parent process
7
# The components are the boxes in an architectural diagram.
Connectors in execution architecture
Connectors
• Connectors indicate that one component calls another
• The arrow depicts the call direction
• The arrow head points from the calling component to the called component
• Three di�erent types of arrows for three di�erent calling scenarios
8
Connectors in execution architecture
• Synchronous communication• The calling components waits for a response of the called component
• Asynchronous communication• The calling component does not wait for a response
• Callback• The calling component receives a response asynchronously by se�ing a means bywhich the called component can send response later
9
Connectors in execution architecture
Figure 2: Execution connectors from So�ware Architecture Primer
10
Execution architecture: Example
Figure 3: Example of execution architecture from So�ware Architecture Primer
11
Conceptual vs. Execution arch.
Element Conceptual Execution
Components Domain-level responsibilities Unit of concurrent activityConnectors Information flow InvocationViews Single Multiple
12
Conceptual vs. Execution arch.
Figure 4: Conceptual vs. execution from So�ware Architecture Primer
13
Initial Design
How to create the execution architecture?
Execution Architecture Design
• Here we design amultiple models
• Some of them will include physical components, i.e. hardware
• Each model is at a specific level of granularity
• Less details• Concurrent subsystems• Processes
• More details• Threads
14
Concurrent subsystems model
Concurrent subsystems model
• Top-level execution model• To get an overview of the running system
• Subsystems can be quite complex and have many processes and/or threads
• However, a concurrent subsystem is not something that is clearly defined
15
# Only in exceptions it is clear how a concurrent subsystem is structured.
# Each of these components is a complex subsystem (comprising thread andpotentially processes)
Concurrent subsystems model
• A large number of similar processes should be treated as a single unit• e.g., the indexing system of a search engine
• A lot of processes there but logically they belong to the same unit
• Crawler, parsers, analysers, index updating, …
17
# The architecture should aid communication and also serve as a tool to finderrors, thus an overly complex diagram (while technically correct) might notserve this purpose.
Concurrent subsystems model
• A process that has a high degree of internal concurrency (threads) should betreated as a concurrent subsystem
• E.g. a server is typically a single process but might create threads to handle clientrequests
• Existing systems are best treated as concurrent subsystems• E.g. a file server
18
Concurrent subsystems model
1. A concurrent subsystem is always long-lived
2. Created when the systems is started
3. Closed when the system is shutdown
4. Operates throughout the system lifetime
19
Process model
Process model
• Restricting a concurrency model to processes depicts the execution structure
• Basically, you examine each concurrent subsystem for processes
• You do not go into details on external systems
• Typically, such models will be only slightly more detailed than concurrentsubsystem models
20
# If a concurrent subsystem only comprises threads then the process modelwill be identical to the concurrent subsystem model.