Software Systems Design: Comprehensive Notes on Architecture and Design

Introduction to Software Architecture

  • Goal of Architectural Design: To create a product that is reliable, secure, and efficient, architectural design must focus on:

    • The overall organization of the system.

    • The decomposition of software into specific components.

    • The organization of servers.

    • The specific technologies utilized to build the software.

  • Impact of Architecture: The architecture of a software product fundamentally affects its performance, usability, security, reliability, and maintainability.

  • Interpretations of 'Software Architecture':

    • Architecture as a Noun: Focuses on the physical and logical structure of a system.

    • Architecture as a Verb: Focuses on the process and actions involved in defining these structures.

  • IEEE Definition of Software Architecture: Architecture is defined as the fundamental organization of a software system embodied in its components, their relationships to each other and to the environment, and the principles guiding its design and evolution.

Software Components and Design Principles

  • Definition of a Component: An element that implements a coherent set of functionality or specific features.

  • Service Collection: A software component can be viewed as a collection of one or more services that are available for use by other components.

  • Abstraction in Design: When designing software architecture, it is not necessary to decide how an architectural element or component is to be implemented immediately. Instead, the focus is on designing the component interface, leaving the implementation details for a later stage in the development process.

The Importance and Benefits of Architecture

  • Influence on Non-functional Properties: Architecture is critical because it has a fundamental influence on non-functional system properties (e.g., security, performance, etc.).

  • The Design Process: Architectural design involves understanding the various issues affecting the product's architecture and creating descriptions that highlight critical components and their relationships.

  • Goal of Complexity Minimization: Minimizing complexity is a primary goal for architectural designers.

    • High complexity makes a system difficult and expensive to understand or change.

    • Complexity increases the likelihood of programmers making mistakes, introducing bugs, and creating security vulnerabilities during modifications or extensions.

  • Specific Benefits of Good Architecture:

    • Stakeholder Communication: Eases communication among various stakeholders.

    • Implementation Constraints: Defines the constraints under which the implementation must occur.

    • Change Management: Makes it easier to reason about system changes and manage them effectively.

    • Estimation: Enables more accurate estimates for costs and development schedules.

Perspectives and Views in Software Architecture

  • Handling Complexity: Due to the high complexity of software systems, architecture is defined through different perspectives, each containing several views.

  • Module Views (Static Perspective):

    • Focuses on how the system is structured as a set of code units.

    • Example: UML static-module view.

  • Component & Connector Views (Dynamic Perspective):

    • Focuses on the structure of elements that exhibit run-time behavior and the interactions between them.

    • Referred to as the C&C view.

  • Allocation Views (Deployment):

    • Focuses on how the software relates to non-software structures in its environment (e.g., hardware and network).

Non-functional System Quality Attributes

  • Responsiveness: Whether the system returns results to users within a reasonable and acceptable timeframe.

  • Reliability: Whether system features behave as expected by both the development team and the end users.

  • Availability: The measure of "uptime"; specifically, whether the system can deliver services when requested by users. It is normally expressed as a percentage of time available.

  • Security: The system's ability to protect itself and user data from unauthorized attacks or intrusions.

  • Usability: The ability of users to access required features and use them quickly and without errors.

  • Maintainability: The ease with which a system can be updated and new features added without incurring undue costs.

  • Resilience: The system's ability to continue delivering services to users even in the event of an external attack or a partial failure.

Architectural Drivers and Influences

  • Definition of Architectural Drivers: These are the design forces that influence the early decisions made by architects. They are an early attempt to capture the most influential requirements from the total set of system requirements.

  • Categories of Drivers:

    • Constraints: Includes both Technical Constraints and Business Constraints.

    • Quality Attributes: The non-functional requirements.

    • High-Level Functional Requirements: The core actions the system must perform.

  • Issues Influencing Architectural Decisions:

    • Nonfunctional product characteristics.

    • Software compatibility requirements.

    • Product lifetime.

    • Software reuse goals.

    • Number of users anticipated.

Architectural Trade-offs

  • Maintainability vs. Performance:

    • Improvement of Maintainability: Achieved by decomposing the system into small, fine-grain, self-contained parts that do one thing only.

    • Performance Cost: Fine-grain decomposition increases the time required for components to communicate with each other. If too many components are involved in a single feature, the software becomes slower.

  • Security vs. Usability:

    • Implementation of Security: Best designed as a series of layers (IP authentication →\rightarrow Application authentication →\rightarrow Feature authentication →\rightarrow Encryption →\rightarrow Protected asset/database).

    • Usability Impact: Multiple security layers require users to remember more information (passwords) and slow down interactions. This often leads users to seek workarounds.

    • Architectural Solution: Use an architecture that avoids excessive layers, prevents unnecessary security enforcement, and utilizes helper components to reduce user load.

  • Availability vs. Time-to-Market:

    • Implementation of Availability: Requires redundant components, sensor components to detect failure, and switching components to move operations to redundant hardware.

    • Development Cost: Building these extra components takes time, increases development costs, and adds complexity, which in turn increases the risk of bugs.

Architectural Patterns and Models

  • Client-Server Architecture:

    • Includes multiple clients (Client 1, Client 2, Client 3, etc.).

    • Features a Load Balancer to distribute requests/responses across multiple servers.

  • Model-View-Controller (MVC) Pattern:

    • Model: The central component representing the data and logic.

    • View: The presentation layer that sends pages to the display and requests refreshes.

    • Controller: Manages user inputs and changes, providing updates to the Model and notifications to the View.

    • The interaction flows between the Browser (Client) and the Server elements.

  • Multi-tier Client-Server Architecture:

    • Organized into specific tiers: Client Tier →\rightarrow Web Server →\rightarrow Application Server →\rightarrow Database Server.

Key Takeaways and Summary

  • System Organization: Architecture is the fundamental organization of components and their relationships/principles.

  • Influence: Architecture significantly impacts reliability, efficiency, and security.

  • Architectural Descriptions: Their primary role is to provide a basis for the development team to discuss system organization. Informal diagrams are preferred for being fast and easy to share.

  • Decomposition: This involves analyzing components and representing them as finer-grain components.

  • Strategies for Success: To minimize complexity, designers should separate concerns, avoid functional duplication, and focus heavily on component interfaces.

  • Web-based Structures: Typically follow a layered structure (UI layers, application layers, database layer).

  • Distribution Architecture: Defines how servers are organized and how components are allocated to those servers.

  • Standard Architectures: Multi-tier client-server and service-oriented architectures are the industry standards for web-based systems.

  • Technology Choice: Deciding on database and cloud technologies is a vital part of the architectural design process.