Home > Articles

This chapter is from the book

1.4 Software Architecture

Designing a software system means creating the architecture—that is, creating a structure composed of system elements and relationships between them to achieve the functional and quality goals for the system. The architecture acts as a blueprint for the construction phase. As we will see, the architecture is also used to allocate functionality to components. Although the AI model depends on data, the architecture provides the components needed to house the ML model but does not directly depend on the data. The influences on the architecture are shown in Figure 1.3. They are the same quality attribute requirements discussed in Section 1.2, “Achieving System Qualities”; the available technologies, including the cloud; and the available resources.

FIGURE 1.3

Figure 1.3 Influences on the architecture.

1.4.1 The Role of the Architecture

The architecture of the system acts as the blueprint for its construction. The architecture must:

  • Structure the system into several portions, such as components or AI models, and their respective relations.

  • Specify the allocation of the various portions of the system to the appropriate class of resource.

  • Allow for monitoring during operations and the generation of alerts in case an incident occurs.

  • Embody an update deployment strategy. If continuous deployment is a goal, then the architecture of the system must allow for the possibility of version skew (multiple different versions being simultaneously active).

1.4.2 Quality Achievement

The architecture will determine the achievement of the quality attribute goals that do not depend on the AI model. For each such quality attribute, specific architectural techniques (called architectural tactics) exist that support the achievement of that quality. These techniques range from “redundancy” for availability to “caching” for efficiency to “support user initiative” for usability.

To achieve a quality in an AI system requires not only the use of architectural tactics, but also the application of different techniques when preparing the training data. We elaborate on the data techniques in Chapters 7–11.

1.4.3 Resources

The system will operate on some collection of resources—including the deployed AI portion. The AI model must be developed and trained prior to deployment, which also uses resources. There are three categories of resources:

  • Local: Laptops or desktop computer.

  • Edge: Smartphones or Internet of Things (IoT) devices. An edge device is limited in at least one respect, be it memory, processing power, battery capacity, or network bandwidth. An IoT device may be limited in all four, whereas a smartphone may be limited only in battery capacity. Sometimes, local computers might be considered part of the edge.

  • Cloud: Resources housed in a cloud, either public or private, but often in remote locations.

The system structure will be distributed. Some portions of it may operate locally, some on edge devices, and some in remote locations. Regardless, the various portions will communicate over a network. This means the designer should have some understanding of networks, network protocols, and messaging.

Furthermore, the AI models and the code will be packaged into some form, often in containers or virtual machines for better scalability, deployability, and dependency management. The containers and virtual machines will be organized based on the software architecture. The cloud provides mechanisms for the designer to run the AI portion and the non-AI portion of the system, as well as a pipeline for AI model training/updating if needed—whether from scratch or to use a hosted or managed solution designed by the cloud provider. We discuss pipelines when we discuss model development in Chapter 5, AI Model Life Cycle.

Most of these topics are covered in Chapter 2, Software Engineering Background: resources, networks, packaging, and software architectures for distributed systems. We call out the resource allocation issues for the AI portion separately, in the next section, since it depends on the AI techniques used.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.