Please enable JavaScript.
Coggle requires JavaScript to display documents.
Software Architecture - Coggle Diagram
Software Architecture
Chapter 4 - Object Oriented Paradigm
4 Principle of accounting
Abstraction
Abstract means a concept or an Idea which is not associated with any particular instance.
One class should not know the inner details of another in order to use it, just knowing the interfaces should be good enough.
Inheritance
Inheritances expresses “is-a” and/or “has-a” relationship between two objects. Using Inheritance, In derived classes we can reuse the code of existing super classes. In Java, concept of “is-a” is based on class inheritance (using extends) or interface implementation (using implements).
For example, FileInputStream "is-a" InputStream that reads from a file.
Encapsulation
Encapsulation is the mechanism of hiding of data implementation by restricting access to public methods. Instance variables are kept private and accessor methods are made public to achieve
For example: We are hidding name, age attributes of person class and restricting them by getter, setter
Polymorphism
Polymorphism : refer to ability of an object to behave differently and assume different forms based on its inheritance hierarchy.
Polymorphism includes:
Vertical override operations between parent classes and derived classes
Horizontal overloading operations within the same class.
Composition Relation
Composition is more specific than aggregation.
Is represented using a solid diamond arrowhead
Composition is a stronger variant of the "owns a“ relationship
Differences between Composition and Aggregation
When attempting to represent real-world whole-part relationships, the composition relationship is most appropriate.
When representing a software or database relationship , an aggregation relationship is best
Benefits of OO design
Supported very well by programming tools
Information hiding
Ease of code reuse
Real world mapping
Aggregation relation
A kind of “whole-part” relationship.
Parts do not have to share the same lifespan as owner.
Aggregation is a special case of association.
In UML, aggregation is represented using a hollow diamond arrowhead.
Chapter 5 - Data Flow Architecture
Data Flow Architecture in UML
Three types of execution sequences between modules
Batch Sequential
Summary
Benefits
Simple division between sub-systems
Each sub-system can be a stand-alone
Limitations
No concurrency and low throughput
High latency
No interactive interface
Applicable Design Domains
Data are batched
Batch sequential compilation was regarded as a sequential process in 1970
In Batch sequential, separate programs are executed in order and the data is passed as an aggregate from one program to the next.
Pipe and Filter
Pipe is a directional stream of data implemented by a data buffer to store all data, until the next filter has time to process it.
It transfers the data from one data source to one data sink.
Pipe is a connector which passes the data from one filter to the next.
Summary
Applicable Design Domain
There are significant work which can be pipelined to gain the performance
Data format on the data stream is simple and stable, and easy to be adapted if it is necessary.
System can be broken into a series of processing steps over data stream, in each step filter consumes and moves data incrementally.
Suitable for producer/consumer model
Benefits
Reusability is easy – plug and play.
Modifiability: Low due to coupling between filters
Concurrency is high.
Simplicity: Clear
Flexibility: High, very modular design
Limitations
Data standards (ASCII, XML?)
Overhead of data transformation among filters such as parsing is repeated in two consecutive filters
Not suitable for dynamic interactions
Difficult to configure a P&F system dynamically.
Error handling issue
Process Control
In process control architecture, the flow of data comes from a set of variables which controls the execution of process.
This architecture decomposes the entire system into subsystems or modules and connects them.
Process Control Architecture is a type of Data Flow Architecture, where data is neither batch sequential nor pipe stream.
Summary
Benefits
Better for situations where no precise formula for deciding the manipulated variable
Can be completely embedded
Limitations
Requires more sensors to monitor system states
Applicable domains
Needs to maintain an output data at a stable level.
The system has a set point which is the goal the system will reach and stay at that level.
Embedded software system involving continuing actions.
Data Flow Architecture is transformed input data by a series of computational or manipulative components into output data.
It is a computer architecture which do not have a program counter and therefore the execution is unpredictable which means behavior is indeterministic
In data flow architecture, the data can be flow in the graph topology with cycles or in a linear structure without cycles.
Data Flow Architecture
System decomposed into modules.
Connection can be IO Stream, Files, Buffers, Pipes
Whole system as transformation of successive sets of data.
No interaction between modules
Modules do not need to know identity of each other
Chapter 6 - Data-Centered Software Architecture & Blackboard Architecture Style
Blackboard Architecture Style
Overview
Consists of three partitions
Knowledge Source
Controller
Blackboard
Blackboard: variation of data-centric
Summary
Benefits
Concurrency: all knowledge sources can work in parallel
Reusability of knowledge source agents
Scalability: easy to add new knowledge source
Limitations
Synchronization of multiple agents is an issue
Debugging and testing of the system is a challenge.
Tight dependency between the blackboard and knowledge source
Application Domain
The problem spans multiple disciplines, each of which has complete different knowledge expertise
Optimal, partial, or approximate solution is acceptable
Suitable for solving immature and complex AI problems
Exhausted searching is impossible.
Introduction
1st Blackboard arch. developed in 1970’s
Use for Speech recognition
Use for Weather forecast
Motivated by classroom teaching
Blackboard
Teacher and students (agents) solve problems together
Agents can work collaboratively or independently
Blackboard system
Starting with a problem specification and ending with a solution
A common knowledge base, the "blackboard", is iteratively updated by a diverse knowledge sources
Data-Centered Software Architecture
Classification
Blackboard
Clients are inactive/passive
Flow of logic is determined by the current data status
Data store is active
Examples
Voice and image recognition system
Security system
Knowledge-based AI system
Business resource management systems.
Repository
Clients of the data store are active
Examples
Library Information system
Interface repository in CORBA
Database management system
Data store is passive
Overview
Consists of two types of components
Data Store
Software component agents
The connection between the data module and the software components is either implemented
Data-centered SW Architecture is characterized
Software component does not communicate directly
The shared data module provides
Deletion
Update and Retrieval
Insertion