executional architecture lecture 16-19 1. conceptual vs execution conceptual architecture execution...

30
Executional Architecture Lecture 16-19 1

Upload: neil-attard

Post on 01-Apr-2015

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

1

Executional Architecture

Lecture 16-19

Page 2: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

2

Conceptual vs execution

ConceptualArchitecture

ExecutionArchitecture

Component

Connector

Domain-level responsibilities

Concurrent activity

Flow of information

Invocation relationship

Page 3: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

3

Execution view

Focuses on the system runtime structure, as:

Hardware elements, subsystems, processes and threads

Page 4: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

4

Execution view

Suited for examining quality attributes, most-notably runtime attributes e.g. performance, scalability, etc

Comprised of “components and connectors”

Page 5: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

5

Components in execution architecture

Concurrent components are designed by: “abstraction created by execution of a

software program”

If the system is a single-computer, single-process, single-thread system then the execution architecture is very simple; having just one runtime entity.

Page 6: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

6

Components in execution architecture Thus, execution architecture is needed for:

1. Distributed systems, Network-based systems

2. Concurrent systems Multi-processor systems (multi-core) Multi-threaded systems - GUI systems

Page 7: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

7

Components in execution architecture

Hardware: runtime resources, Shared memory… e.t.c

Concurrent subsystems: typically has a dedicated computer that runs

it. Processes:

runs on a single computer and has its own memory space.

Threads: executes concurrently with other threads

within the memory space of a parent process.

Page 8: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

8

Connectors in execution architecture Connectors indicate that one component calls

another The arrow depicts the call direction The arrowhead points from the calling

component to the called component

Three different types of arrows for three different calling scenarios: Synchronous Asynchronous Callback

Page 9: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

9

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 setting a means by which the called component can send response later

Page 10: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

10

Communication

Arrows indicate an invocation relationship;

Asynchronous call

Synchronous call

Callback

Page 11: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

11

Execution stereotypes

Similarly to conceptual components execution components can belong to stereotypes

We will use three different stereotypes

Each stereotype has a particular clearly defined semantics

In execution architecture this semantics describes the kind of concurrent activity

Page 12: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

12

Activity stereotypes

User-initiated

Active

Service

How is concurrent activity initiated?

By user action

By an active thread or threads of control

In response to a request

Page 13: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

13

Execution stereotypes

User-initiated: “the component performs action because of

user input”

This components are always user-interfaces.

E.g. an event thread that listens to user-input events, enhances responsiveness of user-interface, and in general usability

Page 14: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

14

Execution stereotypes Active:

“the component generates activity internally”

Typical for real-time portions of the system

For example:1. Components loop continuously or wake up

periodically 2. A crawler in a search engine might be an active

component Whenever there is a new page it generates activity and

invokes parser, analyzer, indexer, ...

Page 15: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

15

Execution stereotypes Services:

“the component waits for requests of other components and generates responses for such requests”

Typically performs a complex task and has

clearly defined protocol for communication with other components

E.g. database, web, file servers

Page 16: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

16

Concurrent subsystems view Contains only concurrent subsystems The highest-level execution view of the

system

A simple audio processing system

Audio Capture/ Playback

SoundLibrary

Sound UI

Audio In/Out

Page 17: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

17

Execution Architecture Design In Execution Architecture Design, we design a

number of different models: Some of them will include physical

components: i.e. hardware

Each model is a model at a specific level of Detail: Less details: concurrent subsystems,

processes More details: threads

Page 18: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

18

Concurrent subsystems model

Top-level execution model: To get an overview of the running system.

Detail-level execution model: Overview of the running system and its

concurrent subsystems. Subsystems can be quite complex and have

many processes and/or threads. However, a concurrent subsystem is not

something that is clearly defined in many cases.

Page 19: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

19

Concurrent subsystems model

A process that has a high degree of internal concurrency (threads) should be treated as a concurrent subsystem.

E.g. a server is typically a single process but might create threads to handle client requests.

Page 20: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

20

Concurrent subsystems model

A concurrent subsystem is always long-lived:

Created when the systems is started

Operates throughout the system lifetime

Closed when the system is shutdown

Page 21: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

21

Process model

Basically, you examine each concurrent subsystem for processes.

Restricting a concurrency model to processes depicts the execution structure.

You do not go into details on external system.

Typically, such models will be only slightly more detailed than concurrent subsystem mode.

Page 22: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

22

Process model (2)

Process model of a TCP/IP server

Page 23: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

23

MPS Execution Architecture Start with the big picture: concurrent systems:

MPS is a Web application What concurrent subsystems will we have:

1. A Web browser and a Web server:a. The application logic is on the server side b. We need a Web server which can run

applications

2. Thus, the Web server is actually a Web application server

Page 24: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

24

MPS Execution architecture

Page 25: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

25

Detailed execution model Includes process‘s threads, but;

Threads do not have their own memory space Nor they have their own copy of the code in

memory

The code is loaded only once by their parent process

The memory is typically shared by the threads

We need to take care about thread synchronization

Page 26: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

26

MPS Detailed Execution Architecture Example: Web server with a database server

A content management system(CMS) with content stored in a database

What happens when a field is updated in the database? Note, Database server is a separate process

Page 27: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

27

MPS Detailed Execution Architecture

Page 28: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

28

Quality attributes Many quality attributes are addressed by the

execution architecture: For example:

Usability: in GUIs is addressed by a special event thread

Highly Reliability: component needs a separate execution component

Security: typically requires a separate execution component

Page 29: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

29

Execution behavior

We will use-case maps to model behavior

Actually we need only to verify that execution architecture supports the desired behavior.

We can use the same use-case maps from the conceptual architecture.

Page 30: Executional Architecture Lecture 16-19 1. Conceptual vs execution Conceptual Architecture Execution Architecture Component Connector Domain-level responsibilities

30

Execution arch. summary What you need to submit:1. Execution diagram showing where

conceptual components reside.2. Execution diagram using stereotypes.3. The same use-case maps from conceptual

architecture as a verification of execution architecture.

4. If needed some textual explanation to backup your decisions.