Software Architecture Design Space 2
Software Architecture Design Space 2
Chapter Outline
Global Analysis Types of Software Structures Software Static Structure Software Runtime Structure Software Management Structure Software Elements Software Connectors An Agile Approach to Software Architecture Design
Global analysis
Identify the external influencing factors and critical requirements that could affect the architecture Analyze them to come up with strategies for designing the architecture
If all cannot be satisfied, decide which has priority, renegotiate a requirement, or change some external factor to come up with workable strategies
Technological factors
Available hardware and software technology
Product factors
Performance, dependability, cost May be different in future versions
Global analysis(contd)
Many factors affect the entire system
Strategies should address global concerns, but provide guidance for implementing them locally
Global analysis(contd)
Complements the risk analysis and/or requirements analysis Requirements and risk analyses might give the analyzed factors
Then develop strategies to the design
Provides a systematic way of identifying, accommodating and describing the affecting factors
Global analysis(contd)
Analyzing factors
Take as input the organizational, technological and product factors
Make them explicit
Changeability
In what way could the factor change? How likely will it change during or after development? How often will it change? Will the factor be affected by changes in the other factors?
Product factors
Functional features and qualities of the product
A software architecture design is a set of software elements connected by a set of connectors. From a dynamic structure point of view, a software element can be a process, an object, an instance of a software component, or a service.
Web services and service-oriented architectures have brought us more flexible connector implementation technologies and software architecture varieties.
Managing static structures involves layers of abstraction and of refinement showing visibility and encapsulation, respectively.
Software Elements
At runtime each software element has well-defined functions and connects to the other elements into a dependency graph through connectors. The elements of a software architecture are usually refined through multiple transformation steps based on their attributes and the project requirement specifications. Depending on each software element's assigned function, there may be different synchronization and performance constraints. For example, some elements are reentrant objects or software components (meaning that multiple threads can execute in an element concurrently without interfering with each other) while some elements are not reentrant and no more than one thread may execute in it at any time.
Software Elements
Depending on the multiplicity of an element, it could be invoked by a limited number of other elements at execution time, or it could be invoked by unlimited elements, as in the case of a server element. Scalability, response time, and throughput become important performance constraints and must be considered during the element's implementation.
Software Connectors
The connectors in software architecture are refined during the design process and are heavily influenced by a project's deployment environment. A connector indicates the necessity during system execution for one of the elements to send a message to another element and potentially get a return message. During software architecture refinement, if two elements are mapped to a single process, the connector can be mapped to a local method invocation. If two elements are mapped to two different processes on the same computer, the connector can 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 can be used to refine the connector between them.
Software Connectors
Software connectors are classified according to many attributes, including synchronization mode, initiator, implementation type, active time span, fan-out, information carrier, and environment. Based on the connector's synchronization mode, we can classify all connectors into two categories: blocking connectors and non-blocking connectors. A blocking connector allows one of its incident elements to send a request (method call or message) to another and wait for a response (method return value or message). The element will be blocked from further execution until it receives a response. A non-blocking connector allows one of its incident elements to send a request (method call or message) to another and then continue its execution without waiting for a response.
Software Connectors
Based on the connector's initiator, we can classify all connectors into two categories: one-initiator connectors and two-initiator connectors An initiator is an incident element of a connector that can make a request to its partner. A one initiator connector allows only one of its two incident elements to make a request to the other element, but not another way around. A two-initiator connector allows either one of its two incident elements to make a request to the other element. For a system to support callback between its two subsystems, the two subsystems must be connected by a two-initiator connector.
Software Connectors
If the two incident elements are in the same process, say as two threads, they may use a shared variable to exchange information. If they are mapped to different processes on the same processor, then resources like pipes, files, or local message queues may be used to implement the connector. Method invocations and message passing are more common and more structured ways for carrying information. Remote method invocation and messaging can also allow communication among elements deployed on different processors.
Chapter Summary
Software architecture determines the overall structure of a software system and greatly impacts its quality. The architecture can be viewed from multiple perspectives including the code structure (or static structure), runtime structure (or dynamic structure), and management structure (or deployment structure). Each type of structure consists of elements and connectors and their constraint attributes, which are derived from the requirements specification. To minimize the impact of changing project requirements and to maximize the ability to reuse design and implementation, an architect should adopt an iterative process during the design phase. Initial architecture designs should focus on the core functional and nonfunctional requirements; the resulting complex elements can then be refined into subsystems with their own architecture designs. A good architecture solution is typically based on multiple architecture styles for different subsystems or for different system abstraction levels.