chap. 6-2 - kocwcontents.kocw.net/kocw/document/2014/deagucatholic/... · 2016. 9. 9. ·...

44
Software Engineering 2014 SELAB Chap. 6-2 소프트웨어 아키텍처

Upload: others

Post on 06-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

Software Engineering

Ⓒ2014 SELAB

Chap. 6-2

소프트웨어 아키텍처

Page 2: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

아키텍처란 무엇인가?

2

Page 3: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

소프트웨어 아키텍처(1)

• 소프트웨어 아키텍처(software architecture) 정의

– “The software architecture of a program or computing system is the

structure or structures of the system, which comprise software elements,

the externally visible properties of those elements, and the relationships

among them.” (SEI, Carnegie Mellon University)

– 프로그램이나 컴퓨터 시스템의 소프트웨어 아키텍처는 소프트웨

어 구성요소, 그들이 지니고 있는 특성 중에 외부에 드러나는 특성,

그리고 이 요소들 사이의 관계로 이루어진 시스템의 구조 또는 구

조들이다

3

Page 4: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

소프트웨어 아키텍처(2)

• 소프트웨어 아키텍처는

– 요구사항을 제대로 구현하기 위해 도움을 줄 수 있는 커뮤니케이

션 툴로 정의할 수 있음

– 개발 초기의 요구사항과 실제 솔루션과의 갭을 어떻게 매울 것인

가가 중요한 문제가 되어옴

– 이 자리를 소프트웨어 아키텍처가 수행할 수 있음

4

Page 5: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

소프트웨어 아키텍처(3)

• 소프트웨어 아키텍처의 특성

– 구성요소를 정의

– 상호작용을 포함

– 하나이상의 구조를 포함

– 시스템에 대한 추상화임

– 아키텍처의 정의에는 좋고 나쁨에 대한 기준이 없음

• 소프트웨어 아키텍처의 활용

– 소프트웨어 아키텍처는 이해당사자들(stakeholder)과의 커뮤니케이션을 위한 표현 수단

• 다양한 관점에서 기술될 수 있음

• 다양한(때로는 서로 상반되는) 요구사항에 대한 논의에 필요

– 소프트웨어 아키텍처는 조기에 설계를 결정할 수 있음

• 시스템 분석, 설계 시의 초기 결정사항을 제공

– 소프트웨어 아키텍처는 시스템의 이동 가능한(transferable) 추상 개념

• 시스템의 요약된 형태로서 향후 상세한 시스템 구성의 기본을 제공

5

Page 6: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

6

소프트웨어 아키텍처(4)

• Stakeholders and Viewpoints

DevelopingOrganization’s Management Stakeholder

Marketing Stakeholder

End User Stakeholder Maintenance Organization

Stakeholder

Customer Stakeholder

Page 7: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

CS 4311

Learning Objectives

• To understand the concept of software architectures

along with its motivation

• To be able to characterize some important software

architecture styles

•7

Page 8: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

8 CS 4311

Outline

• What’s software architecture?

• Elements of software architecture

• Architectural styles

•CS 4311

Page 9: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

9

Architecture in Civil Engineering

•Arch •Beam •Suspension •Cable-stayed

Design at the highest level

Example: Bridge architectures

•Why do civil engineers talk about bridge architectures?

Page 10: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

10

What Is Architecture?

• “Arch” used as prefix or suffix

– Meaning: Main, chief, principal, most important, highest, f

undamental, basic, extreme or most characteristic, ruler,

leader

– Examples:

Archangel, archenemy, archduke, archbishop

Matriarch, patriarch, monarch

• Definition in Civil Engineering

– The art and science of designing and erecting buildings

– Fundamental underlying design of buildings

– Style and method of design and construction of buildings

• Buildings and other structures

Page 11: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

11

What Is Software Architecture?

• Framework, mechanism, way, shape, form, means, organization, arrangement

• The Big Picture!

Page 12: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Software Architecture

• The structure or structures of a software system

– software components

– externally visible properties of those components

– the relationships between them

• The set of principle design decisions made about a

software system

– System structure

– Functional behavior

– Interaction

– Nonfunctional properties

– Implementation

– System goals, stakeholders, non-technical considerations, etc.

Page 13: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

13

Outline

What’s software architecture?

• Elements of software architecture

• Architectural styles

Page 14: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Elements of Software Architecture

• Components

• Connectors

• Configuration topologies

• System models

Page 15: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Software Components

• Elements that encapsulate processing and data in a

system’s architecture

• An architectural entity that

– encapsulates a subset of the system’s functionality and/or data,

– restricts access to that subset via an explicitly defined interface,

– had explicitly defined dependencies on its required execution

context.

• Often represented as boxes in diagrams.

Page 16: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Connectors

• Elements that are tasked with effecting and regulating

interactions among components.

• Application independent.

• Often represented as lines in diagrams.

component

connector

Page 17: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Configuration Topology

• A set of specific associations between the components

and connectors of a software system’s architecture.

Page 18: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

System Models

• An artifact that captures some or all of the design

decisions that comprise a system’s architecture.

• Architectural modeling is the reification and

documentation of those design decisions.

• Different models:

– structural vs. behavioral

– static vs. dynamic

– Scope

• Q: Key constraints of layered model?

Page 19: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

19

Outline

What’s software architecture?

Elements of software architecture

• Architectural styles

Page 20: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Architectural Styles

• A named collection of architectural design

decisions that:

– are applicable in a given development context,

– constrain architectural design decisions that are

specific to a particular system with that context, and

elicit beneficial qualities in each resulting system.

• Not about: specific systems, components, inter

action mechanisms, or configurations.

Page 21: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

An Architectural Style Example

• Physically separate the software components used to request

services from the components that provide the services, to allow

for proper distribution and scaling up, both in the number of

service providers and service requesters.

• Make the service providers unaware of the requesters’ identity to

allow the providers to service transparently many, possibly changing

requestors.

• Insulate the requesters from one another to allow for their independent

addition, removal, and modification. Make the requesters dependent

only on the service providers.

• Allow for multiple service providers to emerge dynamically to off-load

the existing providers should the demand for services increase above

a given threshold.

Page 22: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Example: Client-Server

Page 23: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

More on Architectural Styles

Advantages • Each style emphasizes one or more of the quality attributes, such

as usability, availability, security, performance, maintainability,

flexibility, portability, etc.

Remarks: • Each style has its own advantages and drawbacks.

• An application may require several architectural views.

• Choosing the right views is a key factor in having a good design.

Page 24: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

The Repertoire of Architecture Styles

Client-Server Architecture Style Application context:

Clients request services from a server

Centralization of computation and data at the server

Separation of user interface tasks from computation and data management and storage

Q: Any examples?

Page 25: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Client-Server

• Components: Clients and server

• Connectors: Remote procedure call, network protocols

• Data elements: Parameters and return values are sent by the connectors

• Topology: Two-level, with multi-clients

• Qualities yielded: Centralization of computation and data at the server, with the information made available to remote clients. A single powerful server can service many clients.

• Cautions: Network bandwidth.

Page 26: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Three-Tier or N-Tier

• Application context:

– Client-Server architecture style

– Multi-level services are needed

• Q: Examples?

Page 27: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Layered

• Application context: – Ordered layered services are necessary

– Insulate upper layer from lower layer

• Q: Examples?

Page 28: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Layered (Cont.)

• Components: Layers, offering a set of services to other layers, typically comprising several programs or subprograms

• Connectors: Procedure call

• Data elements: Parameters and return values are sent by the connectors • Topology: Linear, for strict virtual machine; a directed acyclic graph in looser interpretations • Qualities yielded: Clear dependence structure; Software at upper levels immune to changes of implementation within lower levels as long as the service specification are invariant; Software at lower levels fully independent of upper levels. • Cautions: Efficiency

Page 29: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Repository

• Application context: – Collaborate and communicate through a shared

repository

• A.k.a. shared state, blackboard, whiteboard

• Q: Examples?

Page 30: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Repository (Cont.)

• Components: ?

• Connectors: ?

• Data elements: ?

• Topology: ?

• Qualities yielded: ?

• Cautions: ?

Page 31: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Repository (Cont.)

• Components: Independent programs, blackboard

• Connectors: Direct memory access; procedure call; database query

• Data elements: Data stored in the blackboard

• Topology: Star topology, with the blackboard at the center

• Qualities yielded: Complete solution do not have to be planned; shared evolving views; collaboration made simple.

• Cautions: Data consistency

Page 32: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Batch Sequential

• Application context: – A series of dedicated and independent components

that transforms data in a sequential manner. – Each component needs to finish its task before the

next one can start.

• Q: Examples?

Page 33: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Batch Sequential (Cont.)

• Components: Independent programs responsible for a particular task or transformation

• Connectors: Procedure call

• Data elements: Intermediate data produced or transformed

• Topology: Linear or ordered

• Qualities yielded: Solve complex task by dividing it into several easier tasks; obtain modifiability/maintainability, reusability,

and flexibility

• Cautions: Error handling; efficiency

Page 34: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Style: Pipes and Filters

• Application context: – A series of independent, sequential transformations

on ordered data – Consists of filters transforming data and pipes trans

ferring data

• Q: Examples?

% ps | grep bash | sort | more

Page 35: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

More Architectural Styles

• Client server • Three-tier • Layered • Repository • Batch sequential • Pipe and filter

• Event driven

• Interpreter

• Peer-to-peer

• Plug-in

• Service-oriented

• Publish-subscribe

• Rule-based

• Mobile code

• …

Page 36: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Service Oriented Architecture (SOA)

Break software into Services

Services are very loosely coupled

Services hide information about how they work

An application can string together many services to provide functionality.

•Layout of Service Oriented Architecture

Page 37: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Benefits

Organizational flexibility: Loosely coupled services ease the

integration into other applications.

Interoperability: Services are able to understand each other

despite the language they were written in.

Reusability & Maintainability – Changes made to one

component in SOA will not ripple outward and affect others.

Reusable services can be easily plugged into new applications

without having to test them.

Page 38: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Drawbacks

Not suitable for Graphical User Interface

functionalities. (i.e. Map manipulation)

Stand-alone or short lived applications that do not

require request and response (i.e. word processing)

Increased complexity in basic understanding and

managing of SOA

Security is an issue as it must be considered at

service level rather than application level

Page 39: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Component-Based Architecture

What is it?

Emphasizes on separation of concerns where each software

component is a software package, service, or a resource that

contains related functions.

Component Interface is a set of methods supported by a

component.

The components are put together to create one system.

This concept is the same when a car is being assembled,

there is prefabricated tires, wheels, stirring wheels, etc.

What problem does it solve?

•Time consumption

•Confusion of where the bug/error is located

•Maintenance of the system

Page 40: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Advantages

Disadvantages

• Reusability

• More reliable systems

• Increases productivity

• Reduction in development cycle time

• Maintenance cost for

component increases

• Components can be pricey

Page 41: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Examples

•Holiday Reservation System

• Enterprise JavaBeans

• Component Object Model (COM)

• .NET model

Page 42: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Shared Nothing Architecture

What is it?

•Form of distributed computing

– Each node is independent and self-sufficient

•Mainly used in web development and database management

What Problem does it solve?

•Avoids a single point of failure

– No centralization

How does it solve the problem?

•None of the nodes share disk memory or storage

•Queries go to the node that contains the information

Page 43: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Database-Centric Architecture

What is it?

•Refers to software in which databases play a crucial role

•Generally, any software that uses a standard, general-purpose

relational DBMS

What Problem does it solve?

•Programs need to manage (edit, store, delete) large amounts of data

•Other architectures make it impossible for this process to exist, and if

they do, make it a resource excessive process

How does it solve the problem?

•Allows for data to be stored in a secure location

•Utilizing various algorithms, this data is always available in a timed

matter

Page 44: Chap. 6-2 - KOCWcontents.kocw.net/KOCW/document/2014/deagucatholic/... · 2016. 9. 9. · •“Arch” used as prefix or suffix –Meaning: Main, chief, principal, most important,

2014 Software Engineering

Peer-to-peer What is it?

Type of decentralized and distributed architectural

network that depends only individual nodes called

“peers” as both suppliers and consumers of resources

What Problem does it solve?

No main server for receiving and delivering all the

requests, instead the workload is distributed to all

peers. This architecture made it possible for the

internet to exist in the very beginning.

How does it solve the problem?

It does not required a centralized server that hosts

its files, since everyone has access to each other’s

files through FTP (File Transfer Protocol)