Architectural Design
[About architectural design]
- Designing the overall structure of a SW system.
- Identifying the main structural components in a system and the relationships between them.
- Designing a system organization that will satisfy the functional and non-functional requirements of a system.
- Depending on the system type, the background and experience of the system architect, the specific requirements for the system.
[The architecture of a packing robot control system]
- Block diagram
- Box (Boxes within boxes): A component (or sub-components)
- Arrow: The flow of data or control signals from component to component.
[SW architectures at 2 levels of abstraction]
[3 Adavantages for designing SW architecture]
Architectural Design Decisions
Non-functional requirements.
Architectural Views (4+1 views)
[Architectural views]
- What views or perspectives are useful when designing and documenting a system's architecture?
-> The "4+1" view model of software architecture
Architectural Patterns
[Architectural Patterns]
-
A stylized, abstract description of good practice, which has been tried and tested in different systems and environments.
-
Describing a system organization that has been successful in previous systems.
-
Including information on when it is and is not appropriate to use that pattern, and details on the pattern's strengths and weaknesses.
1. Model-View-Controller (MVC) pattern
2. Layered Architecture
-
Organizing the system into layers, where each layer provides services to the layer above it.
-
Achieving separation and independence.
-
Supporting the incremental development of systems.
- Some of the services provided by each layer are available to users.
- Only the adjacent layer is affected where layer interfaces change.
-
When used?
- When building new facilities on top of existing systems.
- When several teams develop a system and each team is responsible for a layer of functionality.
- When there is a requirement for multi-level security.
-
Advantages
- Allowing replacement of entire layers so long as(만약 ~하는 한) the inferface is maintained.
- Redundant facilities (e.g., authentication) can be provided in each layer to increase the dependability of the system.
-
Disadvantages
- Providing a clean separation between layers is often difficult.
- Not interacting directly with lower-level layers rather than through the layer immediately below it.
- Performance can be a problem because of multiple levels of interpretation of a service request as it is processed at each layer.
3. Repository Architecture
-
All data is managed in a repository accessible to all system components.
-
Components do tno interact directly, only through the repository.
-
When used?
- When having a system in which large volumes of information are generated that has to be stored for a long time.
- Data-driven systems where the inclusion of data in the repository triggers an action or tool.
-
Advantages
- Components can be independent;
(Don't need to know__ of the existence of other components.)
- All data can be managed consistently as it is all in one place.
-
Disadvantages
- The repository is a single point of failure so problems in the repository affect the whole system.
- May be inefficiencies organizing all communication through the repository.
- Distributing the repository across several computers may be difficult.
4. Client-Server Architecture
- The system is presented as a set of services, with each service delivered by a separate server. (Youtube, Netflix, ...)
- Clients (e.g.,s users of these services) access servers to make use of them.
[The major components of Client-Server Architecture]
-
A set of servers that offer services to other components.
- ex) Print servers that offer printing services.
- ex) File servers that offer file management services.
-
A set of clients that call on the services offered by servers.
-
A network that allows the clients to access these services.
-
When used? (Youtube, Netflix, ...)
- Used when data in a shared DB has to be accessed from a range of locations.
-
Advantages
- Servers can be distributed across a network.
- General functionality (e.g., a printing service) can be available to all clients and does not need to be implemented by all services.
-
Disadvantages
- Each service is susceptigble to denial of service (DoS) attacks or server failure.
- Performance problems as it depends on the network.
- Management problems if servers are owned by different organizations.
5. Pipe and filter Architecture
-
The processing of the data is organized so that each processing component (filter) is discrete and carries out one type of data transformation.
각 처리 구성요소(필터)가 독립적이며 데이터 변환의 한 유형을 수행함
-
The data flows (as in a pipe) from one component to another for processing.
데이터는 파이프처럼 한 구성요소에서 다른 구성요소로 흐름
-
When used?
- Commonly used in data-processing applications where inputs are processed in separate stages to generate related outputs.
주로 데이터 처리 응용 프로그램에서 사용됨. 입력 데이터가 관련된 출력 데이터를 생성하기 위해 각 단게별로 처리되어야 하는 경우에 자주 사용됨
- Advantages
- Easy to understand and supports transformation reuse.
- Workflow style matches the structure of many business processes.
- Evolution by adding transformations is straightforward.
- Disadvantages
- The format for data transfer has to be agreed between communicating transformations.
- It can not reuse architectural components that use incompatible data structures.
Application Architectures
[Application Architectures]
-
Application systems used by the businesses have much in common.
비즈니스에서 사용되는 애플리케이션 시스템들은 많은 공통점을 가짐
-
Application architectures encapsulate the principal characteristics of a class of systems.
애플리케이션 아키텍처는 특정 시스템 클래스의 주요 특성을 캡슐화함
- Real-time system (e.g., data collection systems or monitoring systems)
-
Use case of application architecture models.
-
As a starting point for architectural design process.
아키텍처 설계 프로세스의 시작점으로 사용
-
As a design checklist.
디자인 체크리스트로 사용
-
As a way of organizaing the work of the development team.
개발 팀의 작업을 조직하는 방법으로 사용
-
As a vocabulary for talking about application types.
(Using the concepts identified in the generic architecture.)
애플리케이션 유형에 대해 이야기할 때 사용 (일반 아키텍처에서 식별된 개념 사용)
[The architectures of 2 types of application]
Transaction processing systems
[The software architecture of an ATM system]
- Transaction processing systems can be organized as a "pipe and filter architecure", with system components.
- 2 components: ATM software and the account processing software (Database랑 연결되는듯).
[About Information systems]
- All systems that involve interaction with a shared database.
- Web-based systems, where the user interface is implemented in a web browser.
- The Information system is modeled using a layered approach.
- The top layer (e.g., user interface)
- The bottom layer (e.g., system database)
Language processing systems
- Translate one language into an alternative representation of that language.
- Compiler
- Trnaslate a program written in one language ("source language") into a program written in another language ("target language")
Front End of Modern Compilers
- The lexical analyzer transforms the character stream into a stream of tokens.
- The syntax analyzer transforms the stream of tokens into a syntax tree.
- The semantic analyzer check if the program is semantically well-formed.
- The IR translator traslate the syntax tree into IR.
Lexical Analyzer
- The lexical analyzer transforms the character stream
- into a sequence of lexemes
- and then produces a token sequence (pair of Token name, Token value).
Syntax Analyzer
- The parser transforms the sequence of tokens (One-dimension)
- into the syntax tree: (Two-dimension)
Semantic Analyzer
- ex) Type errors:
- Other semantic errors:
- array out of bounds
- null-dereference
- divide-by-zero
IR Translator
- Intermediate Representation (IR):
- lower-level than the source language
- high-level than the target language
- ex) translate the syntax tree into three-address code:
Summary