Defining Software Architecture
Architecture acts as the critical bridge between high-level requirements and technical implementation. It is an abstraction of the system that focuses on components, their externally visible properties, and their relationships with one another and the environment.
Why Architecture Matters
- Early Decision Making: It represents the first set of design choices, which are often the hardest to alter once development progresses.
- Stakeholder Communication: It provides a high-level view that allows non-technical stakeholders to understand “how” the system will meet their needs.
- Constraint Definition: These definition act as “load-bearing walls”, dictating how the implementation must proceed.
- Organisational Impact: According to Conway’s Law, the system’s architecture often dictates how development teams are structured.
Quality Attribute and Trade-offs
Architectural design is primarily driven by identifying and prioritising the most important quality requirements
Common Trade-off Patterns
Designing for one quality often negatively impact another
- Performance vs Maintainability: Using large, coarse-grained components can boost performance but makes the system harder to maintain.
- Availability vs Security: Adding redundant data stores improves uptime but increases the “attack surface”, making security more complex.
- Safety vs Performance: Localising safety feature often requires more internal communication, which can slow down response times.
Quality Specific Design Decisions
- For Security: Use a layered architecture where critical assets are placed in the innermost protected layers,
- For Maintainability: Use fine-grained, independent, and easily replaceable components.
- For Availability: Implement redundant mechanisms to ensure fault tolerance.
Architecting for Machine Learning (ML)
AI Systems introduce unique complexities that traditional software does not face, such as data pipelines and model drift.
ML-Specific Qualities
Beyond standard software qualities, ML systems must account for:
- Accuracy and Robustness: The statistical reliability and stability of predictions.
- Explainability: The ability to interpret and justify how a model reached a specific output.
- Data Dependency: Requirements regarding data volume, feature size, and the necessity for incremental training.
- Inference Latency: The time taken to generate a prediction, which is critical for real-time applications.
Integrating Models into Systems
Modern AI architecture often separates models from business logic to allow teams to work in parallel and maintain stable interfaces.
- Ensemle Models: Combining multiple models (e.g., averaging their outputs) to improve overall predictions
- Sequential Decomposition: Breaking a model complex problem into a pipeline (e.g., Visual Detector → Language Model → Caption Reranker).
Deployment Architecture
A major architectural decision is determining where the ML “intelligence” lives.
Where Should the Model Reside ?
- Cloud-Centric: Offers high computing power and easy updates but requires a constant internet connection and can suffer from high latency.
- Client Side (On-Device): Better for privacy and offline use, but limited by the device’s battery and processing power.
- Hybrid: Models are split between the device and the cloud balance performance and resource usage.
Section Criteria
- Bandwidth: How much data needs to be sent as input vs received as output ?
- Cost: What is the operational cost of execution and data distribution ?
- Intellectual Property: Is the model sensitive ? Keeping its server-side protects it from being reverse-engineered.
Intelligent Agents
An agent is an autonomous computer system capable of independent action within an environment to achieve its design goals.
The Three Pillars of Intelligence
- Reactivity: The ability of perceive environmental changes and respond in a timely, useful fashion.
- Proactiveness: Taking the initiative to achieve long-term goals rather than just reacting to immediate events.
- Social Ability: Interacting and cooperating with other agents or humans via communication languages.
Important
A major research challenge is balancing reactive and goal-oriented behaviour, an agent that only reacts never finishes its goal, while an agent that never reacts may fail in a dynamic world.