Chapter 6: Architectural Design
Why Architectural Design is Important?
Definition
- Architectural design (meaning: the high-level structure of a software system, showing its main parts and how they connect) is the process of defining a system’s overall organization, including its sub-systems, modules, and control flow.
Causes
- Not specified in notes
Goals / Objectives
- To create a clear framework for control and communication between system parts
- To support stakeholder communication, requirements validation, reuse, negotiation, and complexity management
Importance
- Serves as a foundation for the entire system design
- Helps manage complexity in large systems
- Enables early validation of whether the system can meet its requirements
- Acts as a shared reference point for developers, clients, and other stakeholders
Procedures
- Not specified in notes
Advantages & Disadvantages
-
Advantages:
- Supports stakeholder communication through high-level system views
- Helps system analysts check if requirements can be met
- Enables large-scale reuse of proven architectures
- Serves as a design plan for negotiation and discussion
- Acts as an essential tool for complexity management
-
Disadvantages:
- Not specified in notes
Impact / Effect
- Makes system development more organized and predictable
- Reduces risk of miscommunication between teams
- Increases chances of successful system delivery by aligning design with requirements early
Examples
- Not specified in notes
Key Takeaways
- Architectural design gives a big-picture view of how a system is built
- It’s not just for developers—it helps everyone involved understand the system
- Good architecture helps reuse, manage complexity, and confirm requirements early
Architectural Design Activities
Definition
- The three main activities in architectural design are:
- System Organization (meaning: deciding how to split the system into major parts)
- Modular Decomposition (meaning: breaking those parts into smaller, manageable pieces called modules)
- Control Modeling (meaning: defining how control flows between parts—what starts what, and when)
Causes
- Not specified in notes
Goals / Objectives
- To structure the system clearly
- To decompose large components into reusable, understandable modules
- To define control relationships so services are delivered at the right time and place
Importance
- These activities form the core workflow of architectural design
- They ensure the system is well-organized, maintainable, and functional
Procedures
- System Organization: Identify sub-systems and how they communicate
- Modular Decomposition: Break sub-systems into modules using object-oriented or function-oriented strategies
- Control Modeling: Choose a control style (centralized or event-based) and apply a specific model (e.g., call-return, broadcast)
Advantages & Disadvantages
-
Advantages:
- Provides a structured approach to designing complex systems
- Each activity addresses a different aspect of system design (structure, detail, behavior)
-
Disadvantages:
- Not specified in notes
Impact / Effect
- Leads to a complete architectural blueprint that guides implementation
- Helps avoid chaotic or inconsistent designs
Examples
- Not specified in notes (though examples appear under each sub-activity)
Key Takeaways
- Architectural design has three key steps: organize, decompose, and control
- Each step answers a different question: What are the big parts? How are they built? How do they work together?
- Skipping any of these can lead to a weak or unmanageable system
1. System Organization / Structuring
Definition
- System organization (meaning: dividing the whole system into major independent units called sub-systems and defining how they interact)
Causes
- Needed when building complex systems that must handle multiple responsibilities (e.g., vision, movement, packing in a robot)
Goals / Objectives
- To identify sub-systems
- To establish a framework for control and communication between them
- To choose an appropriate system organization style (repository, client-server, or layered)
Importance
- Sets the foundation for the entire architecture
- Determines how data is shared and processing is distributed
Procedures
- Represent sub-systems in a block diagram
- Decide how sub-systems communicate and share data
- Select one of three widely used organization models:
- Repository model
- Client-server model
- Layered model
Advantages & Disadvantages
-
Advantages:
- Clarifies system boundaries and responsibilities
- Enables parallel development of sub-systems
-
Disadvantages:
- Poor choices can lead to tight coupling or inefficient data sharing
Impact / Effect
- Affects scalability, maintainability, and performance of the whole system
- Influences hardware and network choices (e.g., in distributed systems)
Examples
- Packing robot system includes sub-systems like:
- Vision system
- Object Identification System
- Gripper Controller
- Arm Controller
- Conveyor Controller
- Packing Selection System
- Packing System
Key Takeaways
- System organization means splitting the system into big, independent parts
- You must decide how they talk to each other and share data
- There are three main styles to choose from, each with trade-offs
Repository Model
Definition
- A repository model uses a central database where all sub-systems store and access shared data.
Causes
- Used when large amounts of data must be shared among many sub-systems
Goals / Objectives
- To enable efficient data sharing
- To provide centralized data management
Importance
- Avoids data duplication and ensures consistency across sub-systems
Procedures
- All sub-systems read from and write to a single central repository
- Sub-systems do not need to know how data is produced—only how to use it
- The repository defines a common data schema
Advantages & Disadvantages
-
Advantages:
- Allows sharing of large amounts of data
- Enables centralized management
- Sub-systems are independent of data production details
-
Disadvantages:
- Sub-systems must compromise on a single data model
- No support for specific data management policies per sub-system
- Hard to distribute across multiple machines
- Data evolution (changing the structure) is difficult and expensive
Impact / Effect
- Makes integration easier but limits flexibility
- Can become a performance bottleneck if not scaled properly
Examples
- Integrated CASE (Computer-Aided Software Engineering) toolset:
- Project Repository stores all data
- Tools like Design Editor, Code Generator, Report Generator, etc., all use the same repository
Key Takeaways
- Great for data-heavy systems where consistency matters
- But hard to change or distribute later
- All tools share one central database
Client-Server Model
Definition
- A client-server model is a distributed system where servers provide services and clients request them over a network.
Causes
- Used when processing and data need to be spread across multiple machines
Goals / Objectives
- To distribute functionality across independent components
- To allow clients to access shared services remotely
Importance
- Enables scalable, networked applications
- Supports resource sharing (e.g., files, printers, databases)
Procedures
- Set up stand-alone servers that offer specific services (e.g., data, video, printing)
- Build clients that call on these services
- Connect them via a network (e.g., wide-bandwidth network)
Advantages & Disadvantages
-
Advantages:
- Straightforward data distribution
- Creates an effective network system
- Uses cheaper hardware (clients can be simple)
- Easy to add or upgrade servers
-
Disadvantages:
- Different servers may use different data models, leading to inefficient sharing
- Redundant management (each server manages its own data)
- No central register of available names and services
Impact / Effect
- Makes systems more flexible and scalable
- But can lead to integration challenges if services aren’t well-coordinated
Examples
- Film and picture library system:
- Clients (4 shown) connect via network
- Servers include:
- Catalogue Server (holds catalogue data)
- Video Server (stores film clips)
- Picture Server (holds digitized photos)
- Hypertext Server (manages web links)
Key Takeaways
- Clients ask, servers respond—over a network
- Easy to grow by adding more servers
- But watch out for inconsistent data formats and missing service directories
Layered Model
Definition
- A layered model (also called Abstract Machine Model) organizes the system into layers, where each layer provides services to the one above it.
Causes
- Used when you want to isolate functionality and support incremental development
Goals / Objectives
- To interface sub-systems cleanly through layers
- To allow one layer to change without breaking others (in closed layered models)
Importance
- Supports modular, step-by-step development
- Makes testing and debugging easier by isolating concerns
Procedures
- Stack layers from bottom (e.g., OS) to top (e.g., application)
- Each layer uses services from the layer below and offers services to the layer above
- In a closed layered model, a layer only interacts with adjacent layers
Advantages & Disadvantages
-
Advantages:
- Supports incremental development
- In closed models, changing one layer only affects adjacent layers
-
Disadvantages:
- Not specified in notes
Impact / Effect
- Promotes clean separation of concerns
- Can add performance overhead if too many layers exist
Examples
- Version Management System layers:
- Top: Configuration management system layer
- Then: Object management system layer
- Then: Database system layer
- Bottom: Operating system layer
Key Takeaways
- Think of it like a cake with layers—each layer builds on the one below
- Great for step-by-step building and testing
- Changes usually don’t ripple through the whole system
2. Modular Decomposition
Definition
- Modular decomposition (meaning: breaking each sub-system into smaller, manageable pieces called modules or components)
Causes
- Needed to simplify implementation and assign work to teams
Goals / Objectives
- To decompose sub-systems into modules
- To choose a decomposition strategy: object-oriented or function-oriented
Importance
- Turns big, abstract sub-systems into concrete, buildable units
- Affects code reuse, testing, and maintenance
Procedures
- Use one of two main strategies:
- Object-Oriented Decomposition: Group data and functions into objects (e.g., Invoice, Payment)
- Function-Oriented Decomposition: Split system into functions or processes (e.g., Read invoices, Issue reminders)
Advantages & Disadvantages
-
Advantages:
- Makes code easier to understand and maintain
- Supports team-based development
-
Disadvantages:
- Poor decomposition can lead to tight coupling or code duplication
Impact / Effect
- Determines how flexible and reusable the code will be
- Influences how bugs are tracked and fixed
Examples
- Invoice Processing System:
- Object-Oriented:
- Objects: Customer (with fields: CustomerNo, Name, Address, CreditPeriod)
- Invoice (fields + methods: Issue(), sendReminder(), acceptPayment(), sendReceipt())
- Payment and Receipt objects
- Function-Oriented:
- Functions grouped as:
- Read issued invoices
- Identify payments
- Find payments due
- Issue payment reminder
- Issue receipts
- Data flows between Invoices → Payments → Reminders → Receipts
- Functions grouped as:
- Object-Oriented:
Key Takeaways
- Modular decomposition turns big parts into small, buildable pieces
- You can group by objects (data + actions) or by functions (tasks)
- Choice affects how easy it is to change or fix the system later
3. Control Modeling
Definition
- Control modeling (meaning: defining how control flows between sub-systems or modules—what triggers what and when)
Causes
- Needed because sub-systems must coordinate to deliver services at the right time and place
Goals / Objectives
- To establish control relationships between components
- To ensure correct timing and sequencing of operations
Importance
- Without proper control, the system may miss events, crash, or behave unpredictably
- Critical for real-time and concurrent systems
Procedures
- Choose one of two general control styles:
- Centralized Control
- a. Call-Return Model
- b. Manager Model
- Event-Based Control
- a. Broadcast Model
- b. Interrupt-Driven Model
- Centralized Control
Advantages & Disadvantages
-
Advantages:
- Provides predictable system behavior
- Matches control style to system type (sequential vs. concurrent vs. real-time)
-
Disadvantages:
- Wrong choice can lead to bottlenecks (centralized) or unpredictability (event-based)
Impact / Effect
- Determines whether the system runs smoothly under load
- Affects responsiveness and fault tolerance
Examples
- Call-Return Model:
- Main program calls Routine 1 → Routine 1.1, etc. (like a family tree of function calls)
- Manager Model:
- System Controller manages Sensor Processes, Actuator Processes, Fault Handler, User Interface, Computation Processes
- Broadcast Model:
- An Event and Message Handler sends an event to all sub-systems; only those that can handle it respond
- Interrupt-Driven Model:
- Used in real-time systems with an Interrupt Handler
Key Takeaways
- Control modeling decides who’s in charge of running the system
- Centralized = one boss (good for simple or sequential systems)
- Event-based = react to signals (good for distributed or real-time systems)
Centralized Control
Definition
- A centralized control style means one sub-system has overall responsibility for starting, stopping, and coordinating others.
Causes
- Used in systems where predictable, top-down execution is needed
Goals / Objectives
- To simplify coordination by having a single point of control
- To ensure orderly execution of tasks
Importance
- Reduces race conditions and unpredictable behavior in simpler systems
Procedures
- Two models:
- Call-Return Model: Top-down subroutine calls (like a tree)
- Manager Model: One system manager coordinates concurrent processes
Advantages & Disadvantages
-
Advantages:
- Simple to understand and debug
- Good for sequential or moderately concurrent systems
-
Disadvantages:
- Can become a bottleneck
- Less suitable for highly distributed or reactive systems
Impact / Effect
- Makes system behavior deterministic
- May limit scalability in large distributed setups
Examples
- Call-Return: Main Program → Routine 1 → Routine 1.1 (used in sequential systems)
- Manager Model: System Controller managing sensors, actuators, UI, etc. (used in concurrent systems)
Key Takeaways
- One component runs the show
- Call-return = function calls in order
- Manager = boss that handles multiple tasks at once
Event-Based Control
Definition
- An event-based control style means the system responds to events (from environment or other components) rather than following a fixed sequence.
Causes
- Triggered by external inputs, user actions, or system signals
Goals / Objectives
- To build responsive, reactive systems
- To support loose coupling between components
Importance
- Essential for real-time, interactive, or distributed systems
- Enables asynchronous behavior
Procedures
- Two models:
- Broadcast Model: Event is sent to all sub-systems; those that can handle it do so
- Interrupt-Driven Model: Special interrupt handler responds immediately to urgent signals (used in real-time systems)
Advantages & Disadvantages
-
Advantages:
- Highly responsive to changes
- Broadcast model works well across networked computers
-
Disadvantages:
- Can be hard to debug (events may come in any order)
- Risk of unhandled events or multiple handlers reacting
Impact / Effect
- Makes systems more flexible and dynamic
- But can introduce timing bugs if not designed carefully
Examples
- Broadcast Model:
- Event Handler sends event to Subsystem 1–4
- Each subsystem checks if it can respond (e.g., E1 → SS1, E2 → SS2)
- Interrupt-Driven Model:
- Used in real-time systems (e.g., robotics, medical devices)
Key Takeaways
- System reacts to signals, not a fixed plan
- Broadcast = shout to everyone, let relevant parts respond
- Interrupt-driven = drop everything for urgent tasks (real-time use)