Software architecture is a series of hierarchical decisions

Source: Internet
Author: User
Software Architecture belongs to the scope of design, but not all designs belong to the software architecture design.

As revealed in the previous "decision School" concept of software architecture, software architecture can be considered as a collection of important decisions. Furthermore, architectural decisions are made in a hierarchical and sequential manner.

First, with the sequential decomposition of software systems, software architects should constantly make decisions, such as the modules to be divided into and Responsibilities Why? How are the interfaces of each module defined, the interaction mechanism used between modules, how to meet constraints and quality attribute requirements, and how to adapt to possible changes.

Take a hardware device debugging system as an example. By understanding the requirements, the software architect has a global grasp of the main objectives of the device debugging system: as a device debugging system, its main function is to display the device status in real time and support users to send Debugging commands. In addition, it must be easily tested because it is a software system supporting hardware products, otherwise, it will be difficult to distinguish between hardware faults and software faults. In addition, it must have high performance. The specific performance indicator is "display of device status refresh five times per second, it also supports sending a complete command word ". 1-3.


                
Figure 1-3 CRC card: main objectives of the device Commissioning System

Then, the software architect must plan the specific composition of the entire system. Generally, for an independent software system, it is often divided into different subsystems or subsystems. Each part undertakes relatively independent functions, and each part cooperates through a specific interaction mechanism. In this example, the device debugging system is different. It consists of two relatively independent applications: a desktop application and an embedded application. So how do they communicate? Finally, we decided to connect them through the serial port and use the RS232 protocol for communication. Next, the architect must determine the responsibilities of the two applications, and the final design decision is (CRC card in 1-4): the desktop application is responsible for providing the simulated console and Status display; the embedded applications are responsible for Device Control and status data reading.

 
Figure 1-4 CRC card: Components of the device debugging system

The desktop application of the device debugging system is a complex application. Software architects should also be responsible for the architecture design of the application. As shown in figure 1-5, the communication part is separated as the communication layer. It is responsible for implementing a specific "application protocol" over the RS232 protocol: when the application layer sends a protocol package containing debugging instructions, it transmits the data to the embedded part according to the RS232 protocol. When the embedded part sends the raw data, it interprets it as an application protocol package and sends it to the application layer. The Application Layer displays the device status, provides a simulated console for users to send Debugging commands, and uses the communication layer to interact with the embedded part.


 
Figure 1-5 CRC card: further decomposition of desktop applications

Through the above case, we strongly feel that a series of important design decisions that software architects need to make are carried out in sequence by decomposing software systems. For example, without dividing the entire device debugging system into a desktop part and an embedded part, it is impossible to further split the desktop part into an application layer and a communication layer.

As mentioned above, design decisions are not limited. Active Responsibility Division. For example, how should the application layer be designed to ensure a high user response speed? How should the communication layer be designed to ensure high-performance acceptance of serial port data without data loss? These are also considerations for architects. I will not repeat them here (refer to the Case Analysis Section in Chapter 4th and Chapter 5th ).

Second, "Architecture decision-making is conducted in a hierarchical order" is also manifested in: the Decision-Making sequence is usually to first develop technology-independent decisions, and then to develop technology-related decisions, the latter is implemented under the guidance of the former. This article will be discussed in the software architecture design process (see section 2nd: software architecture design methods and processes ).

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.