Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 2. Software Architecture Design Space - Coggle Diagram
Chapter 2. Software Architecture Design Space
2.2 Types of Software Structures
Software Static Structure
A software project is typically implemented in multiple files. Such as: Executable files, Library files, Binary software component modules, Deployment descriptors, etc.
At software development time
The main software elements are source code files
Each modules has assigned functional and nonfunctional attributes
API defined for modules separates module’s interface and implementation
The connectors at this level are in the form of module dependency
May exhibit some attributes
Direction
Synchronization
Sequence
At deployment time:
The elements are binary versions of the project modules and files.
Several source code modules may be packaged into the same deployment unit
The connectors in the deployment structures are basically the same as those for the source module structures
Managing Static Structural Representations
Static structure affects the architecture's clarity, construction strategy, maintenance, reengineering, reusability…
It plays a crucial role in the management of large software systems because it deals with the packaging of software modules in order to facilitate system construction and maintenance through a clear portrayal of intermodule relations.
Involves layers of
Abstraction for encapsulation
Refinement showing visibility
Two kinds of static hierarchical relations
A linear client-server relation is formed when a component provides primitive abstractions to another component
A tree-like hierarchy of refinement relations is formed when an abstraction is implemented, and recursively divides into subcomponents. A refinement relation specifies how a module (parent) is decomposed into a refinement module (child).
Software Runtime Structure
Runtime project consists of elements: Processes, Threads, Web services, Distributed objects
These elements may run on the same computer or on multiple computers across a network.
Serve as the technical backbone of architecture designs and provide the basis from which other structures are derived.
Software Runtime Element
The same element in a code structure can implement or support multiple runtime elements
Several code structure elements may implement or support a single runtime element
Run-time Connector Properties
Runtime connectors inherit attributes from their source-code structure counterparts, with a few extra attributes
Multiplicity:
One element can be connected to multiple elements if it needs to invoke methods of multiple elements at runtime.
Distance and connection media
Two connected element may communicate in the same thread, in the same process , on the same computers, or on different computers across a network
Media can be
Copper/optical
Wired/wireless LAN
Decides the system performance and reliability
Universal invocable
A connector with this attribute set to true allows any external software system to invoke the methods at the connector’s target, irrespective of hardware/software platform, and programming languages
Important for heterogeneous system
Self-descriptive
A connector with this attribute set to true allows any external software system to invoke its target method without pre-installation of any software specific to the method.
It allows clients to choose service providers dynamically.
Software Management Structure
Can be used for resource allocation
2.3 Software Elements
At runtime, element is a self-contained component of a system
Has well-defined functions
Usually interface is public and fixed
Implementation can change with the time
Connected with each other via connector
Software Architects Job
Map functional requirements to software elements
Basic guidelines for mapping runtime elements into their implementations
If an element is reentrant, it can be implemented by a thread or a process
If an element is not reentrant and multiple threads or processes need to communicate with it, it must be run on separate threads or processes in order to be thread-safe
If an element has high multiplicity and its performance is important to the global system performance, an application server should be used for the element's implementation so that it can take advantage of thread and resource pooling, data caching, and dynamic element life cycle management to conserve resources.
If the elements contain heavy computations for deployment at a particular location, a cluster of processors will enhance CPU data processing power
If an element is assigned complex but well-defined functions, sim- ilar to those of some commercial off-the-shelf software compo- nents, and the performance of this element is not critical, then it is more cost-effective to use an existing software component to implement the element's functions.
A complex element can be expanded into a subsystem with its own elements and connectors
A complex element can be transformed into a sequence of verti- cal layered elements if each layer provides a virtual machine or interface to its immediate upper-layer element, and each layered element hides away some low-level system details from the upper layers.
A complex element can be transformed into a sequence of hori- zontally tiered elements if the business logic can be achieved by processing data with a sequence of discrete processing stages, and these processing stages can be implemented by tiered elements with well-defined interfaces and balanced workloads
2.4 Software Connectors
Connects the modules of a system
Should be refined within the design process.
Connector refinement is heavily influenced by a project’s deployment environment
Usually determines the quality attributes of a system
Efficiency
Reliability
Availability
Security
Can be classified into many categories
Software Connectors Guidline
During the refinement of the software architecture
If the two elements are mapped to a single process, the connector could be mapped to a local method invocation
If the two elements are mapped to two different processes on the same computer, then the connector could be mapped to a local message queue or a pipe
If the two elements are mapped to two different computers, then remote method invocation or Web service invocation could be used for the architectural refinement for the corresponding connector between them
Connector type
Based on Synchronization
Blocking
A blocking connector allows one of its incident elements to send a request to another and wait for a response.
The element will be blocked from further execution until it receives a response.
Non-blocking
A non-blocking connector allows one of its incident elements to send a request to another and continues its execution without waiting for a response
Initiator
One Initiator
It only allows one of the two connected elements initiates the request, but not another way around
Two Initiator
Either of the two elements can make the request
Information Carrier
Variable
Environment resource
Method
Message…
Connector Implementation type
Signature based
Usually method invocation
Signature: the method name plus the list of parameter types
Method parameter indicates operation type
Protocol based
A protocol-based connector can implement multiple operation types with a single binding signature
E.g., HTTP, SMTP, etc.
Connector’s active time
Programmed
A method call will be made at a time specified at programming time
Event-driven
One element will function as an event source
All elements that need be notified of the event will register as listeners of the event source
When the event happens, all the registered listener elements will be notified for potential reaction
Depending on connector span
Local
Network
Connector Environment
Homogeneous
both elements must be on the same platform
Heterogeneous
both elements can be on different platforms
2.5 Agile Design
Iterative Refinement
Refine designs based on changing requirement
2.1 Overview
Architectural design space
A software architect’s responsibility:
proposing a concrete architecture that best supports the detailed design and implementation of a specific project.
Software architect must understand the software architecture's design space:
Design Space
Based on quality attributes