Please enable JavaScript.
Coggle requires JavaScript to display documents.
7. Hierarchical Architecture (Devided as (Main/subroutine (Overview…
7. Hierarchical Architecture
Overview
Key Idea:
Services layered
- Upper layer consumes service from lower layer
Why? System is too complex => is decomposed into
logical modules
or subsystems at different levels
System SWs are typically – hierarchical architecture
Example:
Microsoft .NET
Unix operating system
TCP/IP
General Rules
Lower layers
provide more
specific functionality
down to fundamental utility services
(I/O services, transaction, scheduling, security services, etc.)
Middle layers
provide more
domain dependent
functions
(Business logic, core processing, etc.)
Upper layers
provide more
abstract functionality
in the form of user interfaces (Command line interpreter, GUI, Shell programming)
Plus points: Any changes to a specific layer may affect only its adjacent upper layers. => No ripple effects
Devided as
Main/subroutine
Overview
Probably the oldest and most widely used architecture.
Purpose
:
Encourage re-use of modules
Freely develop individual modules or subroutine.
Idea
:
System decomposed into sub-routines
A “main” program calls sub-routines and accomplishes tasks
How sub-routines call is supported
is supported by
Assembly
Protect old register values by pushing to stack
Set parameters in register
Call the subroutine (Jump, Long Jump, Call instruction, Software Interrupt)
is supported by
High Level Language
Much more convenient
Much more tricky!
Parameter passing
Parameter passing
Pass by value
Pass by reference
Design
Usually Requirement Spec. Specified in Data Flow Diagram (DFD)
DFD?
Two types of flow:
Transform Flow
: input data get processed and results in output data (sequential)
Transaction Flow
: depending on input data, take different control actions (branch)
Mapping Process
Identify transform and Transaction flow
Map each flow into a subroutine
Generally: a main process controls the overall flow
Evaluation
Benefits
Easy to decompose the system
Can still be used in sub-system of OO Design.
Limitations
Globally shared data are vulnerable
Tight coupling may cause ripple impacts as compared
Master/slave
Overview
A variant of main-subroutine architecture
supports fault tolerance and system reliability
In this architectures
The slaves provide replicated services to the master
The master selects a particular result among slaves by certain selection strategies.
Slaves may perform the same functional task by different algorithms and methods or a totally different functionality.
Characteristics
: Parallel computing and accuracy of computation
Applicable Domain
: Where reliability is crucial
Layered architecture
Overview
Ideas
:
Functionality grouped into layers
Upper layer invoke func. in lower layer
Physical Implementations
:
Functions in one layer usually organized in one package
Some times deployed as services
Examples
:
OSI 7-layer Network Stack
OS (driver, kernel, system call, application)
Web service (ip, tcp, http, xml, SOAP, WSDL, BPEL, UDDI)
Evaluation
Benefits
Incremental software development
Enhanced independence of upper layer to lower layer
Enhanced reusability and interchangeability
Component-based technology is a suitable
Promotion of portability
Limitations
Lower runtime performance
Many applications can not fit this architecture
Exception and error handling
Application Domain
For systems that can be divided between portions providing generic services to the application of the system
For applications which have classes that are close related each other
Virtual machine
Overview
Variation of Layered Approach
Ideas
Provide a virtual interpretation layer that separates Application and Physical machine layer
i.e., Software/Components run on simulation layer
Evaluation
Benefits
Portability and machine platform independency
Simplicity of the software development
Simulation for non-native and disaster working model
Limitations
Slow execution of the interpreter
Additional overhead due to the new layer
Applicable Design Domain
Suitable for solving a problem by simulation or translation
Sample applications such as interpreters of microprogramming, XML processing, script command language execution, rule-based system execution, Smalltalk and Java interpreter typed programming language