Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hierarchical Architecture

Similar presentations


Presentation on theme: "Hierarchical Architecture"— Presentation transcript:

1 Hierarchical Architecture

2 Objectives Introduce concepts of hierarchy arch. pros and cons
Main/subroutine Master/slave Layered architecture Virtual machine pros and cons implementation techniques 1 min

3 Overview Key Idea: services layered
Upper layer consumes service from lower layer Why? system too complex 1.5 min

4 Overview System SWs are typically – hierarchical architecture Examples
Microsoft .NET Unix operating system TCP/IP 1.5 min

5 General Rules Services at lower level provides more specific functionality down to fundamental utility services such as I/O services, transaction, scheduling, security services, etc. Middle layers provide more domain dependent functions such as Business logic, core processing, etc. Upper layers provide more abstract functionality in the form of user interfaces such as Command line interpreter, GUI, Shell programming Plus Point: Any changes to a specific layer may affect only its adjacent upper layers. So, no ripple effects of change 1.5 min

6 Main/Subroutine Architecture
Probably the oldest and most widely used architecture. Purpose: Encourage re-use of modules Idea System decomposed into sub-routines A “main” program calls sub-routines and accomplishes task 1 min

7 How Sub-routine Call is Supported
Function Call 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 Function Call Supported by High Level Language Much more convenient Much more tricky! Parameter passing Pass by value Pass by reference 1.5 min

8 Main/Subroutine Design
Usually Requirement Spec. Specified in Data Flow Diagram (DFD) Objective: Map from DFD to Main/Subroutine Design 1 2 3 4 5 7 6 8 Customer record Customer info validate return Action path 1.5 min

9 DFD Two types of flow Mapping Process
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 flows Map each flow into a subroutine Generally: a main process controls the overall flow 1.5 min

10 DFD mapped into main/subroutine structure
#2 #1 #3 #4 #7-8 #5-6 #6 #5 #8 #7 Do it on board: 2 min 15.5 min now

11 Main/subroutine: Summary
Benefits: Easy to decompose the system Can still be used in sub-system of OO Design. Limitation: Globally shared data are vulnerable Tight coupling may cause ripple impacts as compared to OO design 1.5 min 17 min now

12 Master-Slave A variant of main-subroutine architecture It supports
Fault tolerance and system reliability In this architecture: 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. 1.5 min 17 min now

13 <<slaves>>
Master-Slave Block diagram for master-slave architecture Class diagram for master-slave architecture Master Slave 1 Slave 2 master <<slaves>> +service() slave 2+ 1.5 min 17 min now

14 Master-Slave Characteristics: Applicable domain:
Parallel computing and accuracy of computation Applicable domain: Where reliability is crucial 1.5 min 17 min now

15 Layered Arch. Idea: functionality grouped into layers
upper layer invokes func. in lower layer 0.5 min

16 Example Benefits: Mainly in system development and maintenance
(1) interface defined and published  concurrent development by multiple teams (2) each layer is thoroughly tested  no deeply nested debugging 1.5 min

17 Physical Implementation
Functions in one layer usually organized in one package Some times deployed as services 1 min

18 Examples OSI 7-layer Network Stack
OS (driver, kernel, system call, application) Web service (ip, tcp, http, xml, SOAP, WSDL, BPEL, UDDI) 1.5 min

19 Summary - Layered Applicable Design Domains:
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 0.5 min

20 Summary - Layered Benefits: Limitations:
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 2 min 24 min

21 Virtual Machine Variation of Layered Approach Idea:
Provide a virtual interpretation layer that separates Application Physical machine layer i.e., Software/Components run on simulation layer 1 min

22 Example 1 1 min

23 Summary Applicable Design Domain: Benefits: Limitations:
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 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 1.5 min


Download ppt "Hierarchical Architecture"

Similar presentations


Ads by Google