3. 1.Introduction
• Characterized by viewing the entire system as
a hierarchy structure.
• Example:
– System Software Design
• Lower Level
– i/o services, scheduling and security etc
• Middle Level
– Business logic or core processing service.
• Upper Level
– User interface as GUI
4. 2.Types of Hierarchical
There are 4 types of Hierarchical Architecture
1. Main-Subroutine Architecture
2. Master-Slave Architecture
3. Layered Architecture
4. Virtual Architecture
5. 2.Types of Hierarchical
There are 4 types of Hierarchical Architecture
1. Main-Subroutine Architecture
2. Master-Slave Architecture
3. Layered Architecture
4. Virtual Architecture
6. 1.Main-Subroutine Architecture
• The purpose of this architecture style is to
reuse the subroutines and have individual
subroutines developed independently.
• Data is passed as parameters.
- Pass by value
-Pass bye reference
7.
8. Continue…
• Benefits:
-It is easy to decompose the system based on the
definition of the tasks in a top-down refinement
manner.
-This architecture can still be used in a subsystem
of OO design.
• Limitations:
-Globally shared data introduces vulnerabilities.
- Tight coupling may cause more ripple effects of
changes as compared to OO design.
9. 2.Types of Hierarchical
There are 4 types of Hierarchical Architecture
1. Main-Subroutine Architecture
2. Master-Slave Architecture
3. Layered Architecture
4. Virtual Architecture
10. 2.Master-Slave Architecture
• Supports fault tolerance and system reliability.
• Slaves provide replicated services to the
master.
• Reliability is critical
– Example:
• Fork()
• Database Transaction
11.
12. 2.Types of Hierarchical
There are 4 types of Hierarchical Architecture
1. Main-Subroutine Architecture
2. Master-Slave Architecture
3. Layered Architecture
4. Virtual Architecture
13. 3.Layered Architecture
• Decomposed into a number of higher and
lower layers.
• Each layer has its responsibility.
• Two interfaces: the up interface provides
services to its upper layer and the low
interface requires services from its lower layer.
• Example:
– OSI Model of Network
14.
15. • Benefits:
– Incremental software development based on
increasing levels of abstraction.
– Flexibility
– Component-based technology is suitable
• Limitations:
– Many applications cannot fit this architecture
design.
– “bridging” may cause tight coupling or deadlocks
16. 2.Types of Hierarchical
There are 4 types of Hierarchical Architecture
1. Main-Subroutine Architecture
2. Master-Slave Architecture
3. Layered Architecture
4. Virtual Architecture
17. 4.Virtual Architecture
• Built on an existing system and provide virtual
abstraction.
• Appear similar to emulator software
• Example:
JVM
Virtual Box (application software)
18. • Benefits:
-Portability and machine platform
independency
- Simplicity of software development
-Simulation for disaster working model
• Limitations:
-Slow execution of the interpreter due to
the interpreter nature
-Additional overhead due to the new layer
Hierarchical=an arrangement according to relative importance or inclusiveness
The hierarchical software architecture is characterized by viewing the entire system as a hierarchy structure.
In other words, a lower-level module provides services to its adjacent upper-level modules, which invokes the methods or procedures in the lower level.
Example: system software design.
services at lower levels provide more specific functionality down to fundamental utility services such as I/O services, transaction, scheduling, and security services, etc.
Middle layers, in an application setting, provide more domain- dependent functions such as business logic or core processing services.
Upper layers provide more abstract functionality in the form of user interfaces such as command line interpreters, GUIs, Shell programming facilities, etc
Any changes to a specific layer may affect only its adjacent upper layer, but only
when its interface is changed. Otherwise there are no ripple effects of changes.
a purchase process requirement. The process circle #1 receives
requests from the customer and records all related information. The data is forwarded to the next process (circle #2) which validates
the request (either return or purchase), and if the request is invalid it is rejected and the customer is notified (circle #4).
To continue the transaction process #3 next selects one of the two different action paths; process #5 checks stock availability, while process #6 checks the customer credentials before making the invoice. On the alternate path, process #7 checks the return policy, while process #8 performs the refund transaction accordingly.
The master-slave architecture is a variant of the main-subroutine architecture style that supports fault tolerance and system reliability. In this architecture, slaves provide replicated services to the master, and the master selects a particular result among slaves by certain selection strategies. The slaves may perform the same functional task by different algorithms and methods or by a totally different
functionality.
Master-slave architecture is used for the software system where reliability is critical. This is due to the replication (redundancy) of servers.
It should be noted that in database schema design, the terms master-slave or parent-child are employed to specify the dependency of one entity on another. If the master node is deleted then the slave node has reason to stay
As its name suggests, in a layered architecture the system is decomposed into a number of higher and lower layers in a hierarchy; each layer consists of a group of related classes that are encapsulated in a package, in a deployed component, or as a group of subroutines in the format of method library or header file. Also, each layer has its own sole responsibility in the system.
A request to layeri+1 invokes the services provided by the layeri via the interface of layeri. The response may go back to the layeri+1 if the task is completed; otherwise layeri continually invokes services from the layeri-1 below.
Each layer has two interfaces: the up interface provides services to its upper layer and the low interface requires services from its lower layer.
A simple software system may consist of two layers: an interaction layer and a processing layer:
• The interaction layer provides user interfaces to clients, takes requests, validates and forwards requests to the processing layer for
processing, and responds to clients.
• The processing layer receives the forwarded requests and performs the business logic process, accesses the database, returns the results to its upper layer, and lets the upper layer respond to clients since the upper layer has the GUI interface responsibility.
Example : ISO's OSI 7-layered
The networks protocols are designed also as layered architecture, except that there are two layered stacks connected by a network
link. A client makes a message or service request to the top layer of one stack. Then all subsequent layers perform their supporting
services and pass on the data with the request all the way down to the bottom layer. The request with the data is sent to the server side
and moves all the way up until it reaches the server application. The response will come in the reverse direction. This works in a
request-response mode.
A request to layeri+1 invokes the services provided by the layeri via the interface of layeri. The response may go back to the layeri+1 if the task is completed; otherwise layeri continually invokes services from the layeri-1 below.
Benefits:
• Incremental software development based on increasing levels of abstraction.
• Enhanced independence of upper layer to lower layer since there is no impact from the changes of lower layer services as long as
their interfaces remain unchanged.
• Enhanced flexibility: interchangeability and reusability are enhanced due to the separation of the standard interface and its
implementation.
• Component-based technology is a suitable technology to implement layered architecture; this makes it much easier for the system to
allow for plug-and-play of new components.
• Promotion of portability: each layer can be an abstract machine (see Section 7.5) deployed independently.
Limitations:
• Lower runtime performance since a client's request or a response to a client must go through potentially several layers. There are
also performance concerns of overhead on the data marshaling and buffering by each layer.
• Many applications cannot fit this architecture design.
• Breach of interlayer communication may cause deadlocks, and “bridging” may cause tight coupling.
• Exceptions and error handling are issues in the layered architecture, since faults in one layer must propagate upward to all calling
layers.
A virtual machine is built up on an existing system and provides a virtual abstraction, a set of attributes, and operations. In most cases a
virtual machine separates a programming language or application environment from an execution platform. A virtual machine may
appear similar to emulation software.
well-known example of virtual machine is the Java Virtual Machine (JVM). This is a runtime environment (RTE) that makes the
Java programming language platform independent. In other words, the Java bytecode and other Java internal code generated by a
compilation system (e.g., javac) can run on any operating system that supports JVM. JVM itself is platform dependent in that the RTE
must be developed based on a specific platform. JVM makes Java programs portable, which is one of the most significant advantages
over other executable programming languages such as C++.
JVM separates the bytecode from the OS machine code. The bytecode is actually in a method format,
and each op code can be interpreted by an interpreter. The virtual machine itself is thus implemented as an interpreter.
Benefits:
• Portability and machine platform independency
• Simplicity of software development
• Simulation for disaster working model
Limitations:
• Slow execution of the interpreter due to the interpreter nature
• Additional overhead due to the new layer