Software Engineering Principles: Requirements, OOAD, Architecture, and Distributed Systems

Fundamentals of Software Engineering and the Software Process

  • Definitions of Software Engineering:

    • Barry Boehm: The practical application of scientific knowledge to the design and construction of computer programs and the associated documentation required to develop, operate, and maintain them.

    • IEEE: The systematic approach to the development, operation, maintenance, and retirement of software.

    • Fritz Bauer: The establishment and use of sound engineering principles (methods) in order to obtain economically software that is reliable and works on real machines.

    • David Parnas: Multi-person construction of multi-version software.

    • Comprehensive Synthesis: An engineering discipline concerned with all aspects of software production, applying a systematic, disciplined, and quantifiable approach to development, operation, and maintenance.

  • Software vs. Other Disciplines:

    • Computer Science vs. Software Engineering: Computer science focuses on the theoretical fundamentals and mathematical foundations of computing. Software engineering is concerned with the practicalities of developing, constructing, and delivering useful software products.

    • System Engineering vs. Software Engineering: System engineering encompasses all aspects of computer-based systems development, including hardware architecture, software design, and process engineering. Software engineering forms a sub-discipline within this broader system engineering chain.

  • Characteristics and Inherent Difficulties of Software:

    • Flexibility: Software is easily changed and adapted compared to physical structures, which often leads to continuous change requests throughout its life cycle.

    • Human-Intensive Construction: Building software relies heavily on human intellect, teamwork, communication, and cognitive design rather than automated manufacturing.

    • Intangibility and Invisibility: Software lacks physical form, making progress, defects, and structural soundness difficult to observe directly.

    • Unprecedented Complexity: As software scales, the state space expands exponentially. A program of 1,0001{,}000 lines of code (LOC) has measurable complexity, but expanding to 10,000 LOC10{,}000\text{ LOC} does not merely increase difficulty by a factor of 1010; it can become 100100 times more difficult without systematic software engineering principles.

    • Hardware Dependency and System Hierarchy: Software resides at the apex of the systems engineering chain, directly interfacing with and depending on physical hardware configurations.

    • Historical State Dependency: The operational behavior of software at any point in time depends directly on its internal state and execution history.

    • Discontinuous Operational Nature: Unlike analog physical machines where small input variations yield small output shifts, a single bit failure or minor boundary error in software can produce catastrophic, discontinuous failure.

  • Techniques for Managing Complexity:

    • Abstraction: Simplifies complex systems by suppressing irrelevant low-level details and focusing solely on aspects critical to a specific objective or architectural layer. Once a higher-level abstract problem is resolved, omitted details are addressed in successive, lower-level abstractions.

    • Decomposition: Partitions an intricate, monolithic problem into smaller, manageable, and largely independent components that can be analyzed, developed, and tested in isolation before being integrated into a coherent whole. Effective decomposition strictly minimizes coupling and interactions among subcomponents.

  • Attributes of Good Software:

    • Functionality and Performance: Delivers the precise features, processing throughput, and response times required by the customer.

    • Maintainability: Code and documentation must be structured to allow cost-effective bug fixes, refactoring, and functional enhancements.

    • Dependability: Encompasses reliability, availability, safety, and security under expected and exceptional operational states.

    • Usability: Software must be intuitive, accessible, and ergonomically designed to avoid imposing unnecessary cognitive load on end users.

  • Software Process Foundations:

    • Fundamental Activities: All software processes incorporate four core activities: specification (defining requirements and operating constraints), development/design and implementation (producing the software architecture and code), validation (verifying that the system satisfies customer requirements), and evolution (adapting software to changing market or technical needs).

    • Process Descriptions: Formal descriptions define workflows by specifying activities, sequence ordering, artifacts/products, engineering roles, and formal preconditions and postconditions governing each stage.

    • Plan-Driven vs. Agile Processes: Plan-driven processes plan all development activities in advance and measure progress strictly against that baseline plan. Agile processes schedule planning incrementally, allowing rapid and continuous adaptation to changing requirements. Practical production environments typically deploy hybrid workflows combining plan-driven governance with agile iterations.

Software Life Cycle Models

  • The Need for Life Cycle Models:

    • A Software Development Life Cycle (SDLC) model provides an organized, diagrammatic, and descriptive framework mapping all activities required to take a software product from initial feasibility through retirement.

    • Without an explicit model, team members lack a shared understanding of roles, dependencies, deliverables, and timelines, leading to chaotic integration and project failure.

  • Classical Waterfall Model:

    • Conceptualized as the baseline theoretical model from which all other life cycle frameworks derive, organizing engineering into sequential, non-overlapping stages.

Phases of the Classical Waterfall Model
  • Feasibility Study: Determines whether the target project is technically achievable and financially viable. Technical leads assess constraints, explore candidate solutions, evaluate hardware/resource requirements, and estimate development budgets and timelines.

  • Requirements Analysis & Specification: Uncovers and formalizes customer requirements through two core operations:

    • Specification: Gathering all relevant user needs and documenting them in structured formats.

    • Analysis: Identifying defects, inconsistencies, omissions, and ambiguities within the gathered requirements.

  • Design: Translates requirements established in the Software Requirements Specification (SRS) into an explicit software architecture and modular schema suitable for code implementation.

  • Coding & Unit Testing: Translates module design models into executable source code. Each module is developed and unit-tested in strict isolation to enable rapid localized debugging.

  • Integration & System Testing: Reassembles unit-tested modules incrementally according to a planned integration schedule, verifying internal interfaces. Complete system testing comprises:

    • α\alpha-testing (Alpha Testing): Comprehensive system validation executed internally by the developer team.

    • β\beta-testing (Beta Testing): Pre-release testing conducted by a selected, representative group of external end users.

    • Acceptance Testing: Independent verification executed by the client to determine final contractual acceptance or rejection.

  • Maintenance: Involves operational support after system deployment. Empirical studies reveal that maintenance accounts for approximately 60%60\% of total life cycle effort, establishing a development-to-maintenance effort ratio of roughly 40:6040:60. Maintenance falls into three categories:

    • Corrective Maintenance: Diagnosing and fixing bugs undiscovered during prior development phases.

    • Perfective Maintenance: Enhancing, optimizing, and adding capabilities to meet evolving customer needs.

    • Adaptive Maintenance: Porting and re-engineering software to run across modified operational environments, such as new hardware platforms or upgraded operating systems.

  • Shortcomings of the Classical Waterfall Model: Assumes flawless, error-free execution across all stages without rework. In reality, human engineers introduce errors in every phase due to oversights, incorrect technical assumptions, or communication breakdowns, requiring iterative feedback loops back to preceding phases.

    • Prototyping / Evolutionary Model:

  • Focuses on building a prototype—a functional, scaled-down, mock implementation of the target system built with shortcuts, stub functions, and non-optimized subroutines.

  • Highly effective under conditions of high requirements uncertainty (e.g., business billing or accounting systems where clients cannot clearly state interface needs) or technical novelty (e.g., developing a compiler for an unfamiliar architecture, where a simple language prototype exposes compiler design bottlenecks before full-scale implementation).

    • Spiral Model:

  • Formulated as a risk-driven meta-model that accommodates and incorporates elements of waterfall, prototyping, and iterative paradigms.

  • Diagrammed as an expanding spiral with an open-ended number of concentric loops representing progressive system releases or project phases (e.g., loop 1 for feasibility, loop 2 for requirements, loop 3 for system design).

  • Each radial loop is divided into four functional quadrants:

    • Quadrant 1: Objective Setting: Explicitly defines the targets, constraints, and operational boundaries of the iteration.

    • Quadrant 2: Risk Assessment and Reduction: Carries out risk identification and mitigation strategies, such as building prototypes, benchmarking alternatives, or running simulation studies.

    • Quadrant 3: Development and Validation: Implements and tests the next progressive version of the software system based on mitigated risk profiles.

    • Quadrant 4: Review and Planning: Evaluates the delivered iteration with the client, assesses progress, and plans the subsequent loop.

  • Trade-Offs: Provides built-in risk governance suitable for mission-critical, complex, and high-budget projects, but incurs significant administrative overhead and process complexity that deters its use in routine projects.

Software Requirements Engineering

  • Definition and Dual Role of Requirements:

    • A requirement specifies a service the system must provide or a operational constraint it must satisfy.

    • Dual Function: Serves as an open, high-level abstract statement during early project bidding to permit multiple technical implementations, while functioning as a precise, legally binding specification within finalized contracts.

  • User Requirements vs. System Requirements:

    • User Requirements: Broad statements composed in natural language accompanied by high-level workflow diagrams detailing provided services and operational constraints, targeted primarily at client executives and non-technical stakeholders.

    • System Requirements: An exhaustive, structured technical document defining functional services, algorithmic behaviors, interface requirements, and operational constraints to establish the implementation contract between client and developers.

  • Core Classes of Requirements:

    • Functional Requirements: Detail exact system services, transformations of input data to output data, system behavior under specific inputs, and automated processing functions. Abstracted mathematically as a set of transformation functions:   {fi}:{i1,i2,…,in}→{o1,o2,…,on}\{f_i\}: \{i_1, i_2, \dots, i_n\} \rightarrow \{o_1, o_2, \dots, o_n\}

    • Non-Functional Requirements (NFRs): Describe operational constraints, quality attributes, and emergent system properties that cannot be expressed as individual procedural functions.

    • Domain Requirements: Arise directly from the fundamental domain of application, reflecting domain-specific operational physics, legal constraints, or standard computational workflows. Failure to satisfy domain requirements often makes the entire system unusable.

Black Box Functional Transformation of Inputs to Outputs
  • Taxonomy of Non-Functional Requirements:

Classification Hierarchy of Non-Functional Requirements
  • Product Requirements: Define constraints on the operational behavior of the runtime system:

    • Efficiency: Dictates resource consumption, categorized into Performance Requirements (transaction speeds, response latencies) and Space Requirements (RAM, secondary storage, disk capacity, bandwidth utilization).

    • Reliability: The mathematical probability that software will execute without functional failure over a defined operational timeframe, evaluated via percentage of successful operations or mean operating intervals.

    • Availability: The proportion of planned uptime that a system remains fully functional and accessible, expressed formally as:     Availability=MTTFMTTF+MTTR\text{Availability} = \frac{\text{MTTF}}{\text{MTTF} + \text{MTTR}}     where MTTF\text{MTTF} is the Mean Time To Failure and MTTR\text{MTTR} is the Mean Time To Repair. Scheduled maintenance windows also directly reduce availability.

    • Robustness (Fault Tolerance): The ability of a system to maintain acceptable functionality when subjected to invalid inputs, component hardware defects, or unpredictable runtime conditions, recovering gracefully without catastrophic crashes.

    • Usability (Human Engineering): Quantifies user effort required to prepare inputs, navigate operational logic, and interpret output information cleanly.

    • Portability: Measures the ease with which code can be migrated between operating systems, database management systems, or hardware architectures.

  • Organisational Requirements: Derived directly from policies, schedules, and enterprise practices within the client or development organization:

    • Delivery Requirements: Concrete milestones specifying deployment schedules and incremental release windows.

    • Implementation Requirements: Dictates programming languages, database systems, architectural patterns, or development frameworks that must be used.

    • Standards Requirements: Mandated adherence to specific organizational coding conventions, architectural guidelines, or official quality certifications.

  • External Requirements: Emerge from legal, sociotechnical, and inter-organizational environments outside the direct system boundary:

    • Interoperability Requirements: Define data exchange protocols and standard communication interfaces required to interface with third-party software systems.

    • Ethical Requirements: Ensure software processes respect user dignity, fairness, accessibility, and transparency without manipulative behaviors.

    • Legislative Requirements: Mandatory legal compliance, encompassing Privacy Requirements (protecting personal identifiers, medical profiles, and transaction records from unauthorized exposure), Safety Requirements (ensuring operations do not cause physical harm to human life or infrastructure), and legal reporting compliance.

    • Requirements Conflicts and Interactions:

  • In complex software systems, non-functional requirements frequently conflict. Resolving these requires trade-off analysis.

  • Spacecraft Avionics Example: To minimize satellite weight, the design must minimize the physical count of silicon chips. To minimize operational power consumption, low-power chips should be selected. However, low-power processing chips possess reduced capacity, requiring a higher total number of chips to execute flight computations. The engineering team must formally identify which constraint takes precedence.

    • Quantifying Non-Functional Requirements via Planguage:

  • Developed by Tom Gilb (19881988, 19971997) to eliminate ambiguity from quality attribute specifications using formal keyword syntax:

    • TAG: Unique text identifier for the requirement.

    • AMBITION: High-level business goal or operational objective.

    • SCALE: Formal units of physical or temporal measurement.

    • METER: Explicit testing protocol or benchmark methodology.

    • MUST: Non-negotiable, legally binding minimum acceptable threshold.

    • PLAN: The intended nominal design target.

    • WISH: The ideal target level of performance.

  • Planguage Worked Specification (Database Query):

    • TAG: Performance.QueryResponseTime

    • AMBITION: Fast response time to database queries.

    • SCALE: Seconds of elapsed time between pressing the Enter key or clicking OK to submit a query and the beginning of the display of query results.

    • METER: Stopwatch testing performed on 250250 test queries that represent a defined usage operational profile.

    • MUST: No more than 10 seconds10\text{ seconds}.

    • PLAN: No more than 3 seconds3\text{ seconds}.

    • WISH: No more than 2 seconds2\text{ seconds} for all queries.

    • The Software Requirements Specification (SRS) Document:

  • Acts as the formal contractual statement of work defining what the system must achieve without constraining internal design (specifies what, not how).

  • Encompasses functional requirements, non-functional constraints, and domain-specific rules.

  • Essential Quality Criteria:

    • Validity: The documented requirements genuinely satisfy the user's business needs.

    • Consistency: Requirements contain no contradictory, mutually exclusive statements.

    • Completeness: All anticipated operational services, boundary constraints, and error scenarios are fully detailed.

    • Realism: Requirements can be implemented within available budgetary, temporal, and technological limits.

    • Verifiability: Requirements are written such that an empirical test case can prove compliance.

    • Requirements Validation Techniques:

  • Cost of Requirements Defects: Correcting a requirements error during post-deployment maintenance can cost up to 100100 times more than remediating an error detected during early implementation phases.

  • Requirements Reviews: Systematic peer reviews involving clients, system analysts, and developers. Review checklists evaluate Verifiability (testability), Comprehensibility (clarity), Traceability (explicit linkage to business origins), and Adaptability (ease of modification).

  • Prototyping: Validating unclear workflows by deploying an executable model directly to end users.

  • Test-Case Generation: Writing formal test cases against draft requirements to expose untestable or ambiguous requirements before engineering begins.

    • Requirements Management:

  • Establishes processes to control requirements creep and scope shifts during development and deployment.

  • Drivers of Requirements Volatility: Upgrades in hardware architecture, evolving third-party system interfaces, shifting corporate priorities, introduction of new legislation, and friction between paying clients (focused on organizational budgets) and end users (demanding specialized operational features).

  • Demands detailed dependency mapping across requirements to determine downstream impacts whenever a change proposal is submitted.

Object-Oriented Analysis and Design (OOAD) with UML

  • The OOAD Continuum:

    • Analysis: Investigates the problem domain and functional requirements without committing to technical implementations. Emphasizes identifying and describing conceptual domain objects.

    • Design: Formulates a conceptual software solution fulfilling established requirements by defining software objects, allocating behavioral responsibilities, and designing collaboration networks.

    • Implementation: Translates design models into source code modules within an object-oriented programming language.

  • Formal Definitions (Grady Booch 1995):

    • Object-Oriented Analysis (OOA): A method of analysis that examines requirements from the perspectives of the classes and objects found in the problem domain.

    • Object-Oriented Design (OOD): A method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as static and dynamic models of the system.

  • Mapping Domain Realities to Software Objects:

    • Library System Example: The physical domain entity "Book" maps to a conceptual domain model containing attributes like title, which is visualized in UML structural class syntax and implemented in Java:

  public class Book {
    private String title;
    public Chapter getChapter(int chapterNum) { /* implementation */ }
  }
  ```
* *Flight System Example*: The physical domain entity "Plane" with a unique physical airframe serial number maps to a UML class specifying `tailNumber` and is expressed programmatically:

java public class Plane { private String tailNumber; public List getFlightHistory() { /* implementation */ } }   ```

  • Unified Modeling Language (UML) Foundations:

    • Maintained by the Object Management Group (OMG; www.omg.org), UML is an industry-standard, technology-agnostic graphical language used to visualize, specify, construct, and document software artifacts.

    • Mitigates the ambiguities of natural language while avoiding premature low-level code implementation details.

  • Taxonomy of the 13 Basic UML Diagrams:

    • Structural Diagrams (Static Architecture):

    • Class Diagram: Defines static structural building blocks, class attributes, operations, and relationships (inheritance, association, composition).

    • Package Diagram: Partitions complex models into logical namespace containers and illustrates inter-package dependencies.

    • Object Diagram: Depicts instances of classes and their runtime data links at a specific moment in execution.

    • Composite Structure Diagram: Visualizes the internal structural decomposition of a classifier, including ports, parts, and connectors.

    • Component Diagram: Models higher-level modular building blocks exposing interfaces and encapsulating executable contents.

    • Deployment Diagram: Maps software artifacts and physical components to actual execution hardware environments.

    • Behavioral Diagrams (Dynamic Execution Over Time):

    • Use Case Diagram: Models functional interactions between actors and the system under design.

    • Activity Diagram: Visualizes procedural workflows, business logic, concurrent flows, and decision pathways.

    • State Machine Diagram: Tracks the discrete lifecycle states of an entity and its state transitions driven by specific events.

    • Interaction Diagrams (Sub-family):

      • Sequence Diagram: Emphasizes time-ordered vertical messaging between participating objects.

      • Communication Diagram: Illustrates message sequencing over an explicit structural network of object links.

      • Timing Diagram: Blends state transitions and vertical timeline constraints to highlight explicit real-time conditions.

Use Case Modeling and Requirements Capture

  • Foundations of Use Cases:

    • Use cases capture narrative descriptions of domain interactions in structured prose, detailing step-by-step user-system dialogues to achieve specific goals.

    • Capture functional requirements and establish the formal verification contract between developers, clients, and end users.

    • The Concept of Scenario: A scenario (use case instance) is a specific execution pathway through a use case. A use case represents the complete set of all successful and alternative/failure scenarios.

    • Simple Simulation Example (Dice Game):

    • System simulates a player rolling two dice.

    • Winning condition: Total face value equals 77.

    • Losing condition: Total face value does not equal 77.

  • Actor Categorization:

    • An actor represents any entity exhibiting behavior outside the system boundary: a human, an external computer application, or an automated time trigger.

    • Primary Actor: Possesses user goals that are fulfilled through the services of the system under design (SuD). Identifying primary actors uncovers the fundamental user goals driving system development.

    • Supporting / Secondary Actor: Provides supporting services, data lookups, or transaction authorizations to the SuD (e.g., automated tax calculation engines, external banking networks). Identifying supporting actors clarifies external protocol interfaces.

  • Four-Step Methodology to Identify Use Cases:

    • Step 1: Choose the System Boundary: Define which elements reside inside the software boundary and which entities are external actors.

System Boundary of NextGen POS
  • Step 2: Find Primary Actors: Brainstorm participants by asking: Who starts and stops the system? Who handles user and security profiles? Who executes system maintenance? Does automated time trigger system events? Which external systems request services?

  • Step 3: Identify Actor Goals (Actor-Goal List): Map every identified actor to their operational objectives:

    • Cashier: Process sales, process rentals, handle returns, cash in, cash out.

    • Manager: Start up, shut down.

    • System Administrator: Add users, modify users, delete users, manage security profiles, manage system tables.

    • Sales Activity System: Remote application that frequently polls each POS terminal node across the network to analyze sales and performance data.

  • Step 4: Define Use Cases Satisfying Goals: Draw structural use-case diagrams and write use-case text specifications.

NextGen POS Use Case Context Diagram
  • Use Case Relationships:

    • Communication Association: A solid line linking an actor to a use case.

    • Include Relationship (<<include>>): Directed dashed line with an open arrow pointing from the base use case to the supplier use case. Signifies functional decomposition and reuse of common logic. The base use case cannot complete without executing the included case. Used to avoid duplicate specifications:

Process Sale with Included Payment Sub-Use-Cases
  • Extend Relationship (<<extend>>): Directed dashed line with an open arrow pointing from the extension use case to the base use case. Represents conditional behavior added to a base case that remains functionally complete on its own. The base case declares explicit "extension points".

  • Generalization Relationship: Solid line with a hollow triangular arrow pointing from a specialized child use case toward a generalized parent use case (e.g., ValidateUser specialized into CheckPassword and CheckFingerprint).

    • Use Case Documentation Formats:

  • Brief Format: High-level paragraph summarizing the primary success scenario (e.g., standard sale flow).

  • Casual Format: Multi-paragraph informal text covering the main success scenario along with brief descriptions of alternate pathways.

  • Fully Dressed Format: Structured, exhaustive specification schema containing:

    • Use Case Name: Action verb phrase (e.g., Process Sale).

    • Scope: Target system boundary.

    • Level: User goal or sub-function.

    • Primary Actor: The initiator calling upon system services.

    • Stakeholders and Interests: Entities with a stake in the outcome and their expectations.

    • Preconditions: System states that must hold true before initiation.

    • Success Guarantee (Postconditions): State of the system upon successful completion.

    • Main Success Scenario: Step-by-step unconditional sequence of events (happy path).

    • Extensions: Alternative branches, failure detections, and recovery procedures.

    • Special Requirements: Non-functional constraints linked directly to the use case.

    • Technology and Data Variation List: Permitted variations in hardware I/O devices.

    • Frequency of Occurrence: Estimated invocation rate.

    • Miscellaneous: Unresolved technical or business questions.

    • NextGen POS Fully Dressed Main Success Scenario (Process Sale):

  • 1. Cashier initiates a new sale transaction.

  • 2. System prompts for product item identifier.

  • 3. Cashier inputs the item identifier.

  • 4. System records the item sale, retrieves description and price, and updates running totals.

  • 5. Steps 2 through 4 repeat until cashier signals entry completion.

  • 6. System calculates and displays line-item sub-totals and applicable sales taxes.

  • 7. Cashier selects payment method.

  • 8. System prompts for payment credentials.

  • 9. Customer submits payment credentials.


  1. System validates payment against external authorization networks.


  1. System commits transaction, updates inventory, and notifies the Accounting and Inventory Systems.


  1. System prints customer receipt; customer departs with purchases.

  • Detailed Case Studies:

  • Password Manager: A secure utility running on Windows interoperable with Firefox and Internet Explorer. Stores user login profiles (website URL, login name, password). Master authentication supports three modes: master credentials, pre-scanned fingerprint, or three challenge questions. Failure on any challenge locks the account; passing all three triggers a password reset. A privileged root user manages global computer profiles. Non-functional performance requires fingerprint authentication within 2 seconds2\text{ seconds}, with successful login within 3 attempts3\text{ attempts} in 90%90\% of cases. If a target site UI changes, the manager must degrade gracefully without crashing, offering manual entry.

  • Library Information System (LIS):

Library Information System Use Case Hierarchy
  • Actors: Member (students, professors, researchers), Non-member (read-only searching/browsing), Librarian (inventory ingestion, item removal), and Library Staff (transaction processing).

  • Use Cases: UC1: Register, UC2: User login, UC3: Search book, UC4: Issue book (incorporating <<include>> Check availability and <<include>> Verify issue count, which specializes via generalization into Verify student issue count and Verify professor issue count), UC5: Return book, UC6: Reissue book, UC7: User logout.

Dynamic Process Modeling with Activity Diagrams

  • Foundations and Semantic Scope:

    • Models the dynamic, behavioral execution flow of business processes, use case interactions, or internal system logic.

    • Functions as the object-oriented counterpart to classical flowcharts and data flow diagrams (DFDs), based on a directed graph data-flow model.

  • Fundamental Notational Elements:

    • Initial Node: Solid filled circle indicating the initiation of execution.

    • Activity Final Node: Solid filled circle enclosed within a concentric ring (bullseye), terminating all flows within the activity diagram.

    • Flow Final Node: A circle enclosing an "X" symbol, indicating that a specific execution path terminates without stopping remaining concurrent paths.

    • Activity / Action State: Rounded rectangle representing an automated computational process or a manual human task.

    • Control Flow / Edge: Solid directed arrow connecting activities to define execution order.

    • Decision Node: A diamond with one incoming edge and multiple outgoing edges labeled with mutually exclusive guard conditions (e.g., [Correct], [Incorrect]).

    • Merge Node: A diamond with multiple incoming edges and a single outgoing edge, combining alternate control paths without synchronization (control passes through immediately).

    • Fork Bar: A solid horizontal or vertical bar with one incoming edge and multiple outgoing edges, splitting a single flow into concurrent parallel activities.

    • Join Bar: A solid horizontal or vertical bar with multiple incoming edges and a single outgoing edge, synchronizing concurrent activities. Outflow does not execute until all incoming parallel activities complete.

  • Swimlanes (Partitions):

    • Vertical or horizontal columns bounded by dashed or solid lines that divide an activity diagram into operational zones, mapping actions directly to the organizational roles or system components responsible for them (e.g., Student, Registrar, System).

IIT Student Enrollment Swimlane Activity Model
  • Advanced Activity Diagram Elements:

    • Object Nodes and Object Flows: Rectangles representing transient data objects passing along edges. Edges connecting action states to an object node indicate the generation or consumption of data.

    • Input and Output Pins: Small square attachments on the border of an action state representing direct object input/output ports, serving as shorthand notation for full object nodes.

    • Data Store: A rectangle tagged with the <<datastore>> stereotype representing persistent stored data that persists across workflow runs.

    • Exception Handling: A protected node linked via a zig-zag arrow (labeled with the ExceptionType) to an Exception Handler Node to capture runtime faults.

    • Interruptible Activity Region: A dashed, rounded enclosure grouping action nodes subject to termination. If an interrupting signal (e.g., Cancel Request) is received, internal execution terminates immediately and control transfers to an external cancellation handler.

Interruptible Activity Region Example
  • Signals and Time Triggers:

    • SendSignalAction: Asynchronously broadcasts an output signal to an external receiver without awaiting a reply.

    • AcceptEventAction: Blocks workflow until a targeted asynchronous signal event occurs.

    • Time Triggers / Events: Clocks that generate time events at specific points. Categorized as Relative Time Triggers (using keyword after, e.g., after (5 seconds)) or Absolute Time Triggers (evaluating an exact date-time stamp, e.g., Jan, 1, 2000, Noon).

    • End-to-End Activity Workflow Implementations:

  • Student Enrollment System in IIT (SEIIT): Begins with Fill-in form, followed by Registrar Check form. A decision node routes incorrect forms back to the student, while correct forms display student data and prompt for input. System forks processing into Verify the applications and Search for Student selection list. Matching records proceed to Create record. Execution transitions to enrollment fee calculation, fee display, student payment, and receipt generation. A fork initiates parallel operations for Payment fees, Hostel allotment, and Medical check, which synchronize at a join bar before triggering parallel issuance of Issue identity card and Issue library card, finally merging into the terminal node.

  • Corporate Purchasing Department: Employees submit purchase orders to internal case workers. If the purchase value is under 1,5001{,}500, the worker issues a direct purchase order to an approved vendor. For purchase values exceeding 1,5001{,}500, the workflow forks to solicit formal vendor bids. Once competitive bids are returned, the worker selects a winning bid, issues the purchase order, and tracks fulfillment.

  • Northstar Hotel Reservation System: Guests choose dates and room types. Existing users authenticate using stored profiles, while new guests register. The system generates a unique reservation code, which users can enter prior to arrival to modify or cancel reservations. At check-in, receptionists retrieve bookings using the code. At checkout, the system validates charges via the card network, prints an optional invoice, and compiles monthly occupancy reports for the hotel manager.

Software Architecture and System Structuring

  • Role of Architectural Design:

    • Serves as the critical bridge linking system requirements specifications to the detailed design process.

    • Defines the high-level structural framework, identifying principal sub-systems, their operational boundaries, communications, and execution control models.

  • Architectural Design Stages:

    • System Structuring: Partitions the system into interacting sub-systems, typically represented as block diagrams.

    • Control Modelling: Establishes control relationships, communication sequences, and execution coordination between sub-systems.

    • Modular Decomposition: Decomposes each sub-system into lower-level modules and classes.

  • Architectural Perspectives / Models:

    • Static Structural Model: Shows the principal components, sub-systems, and packages making up the system.

    • Dynamic Process Model: Illustrates runtime processes, execution threads, and concurrency models.

    • Interface Model: Defines public operations, shared API endpoints, and communication contracts for each sub-system.

    • Relationship Model: Maps relationships between sub-systems (e.g., Entity-Relationship Diagrams, dependency matrices).

  • System Structuring Paradigms:

    • The Repository Model: Sub-systems exchange data through a shared central database/repository, or maintain private databases and exchange information explicitly via messages. Sharing through a central repository is favored when large volumes of data are transferred:

Packing Robot System Structured on Central Repository
* *Advantages*: Components do not need to know how data is produced or stored; centralized backup, security, and transaction management; shared data models are published via a clear repository schema.
* *Disadvantages*: Sub-systems must compromise on a single data schema; evolving the central schema is expensive; global management policies prevent sub-system tuning; difficult to distribute efficiently across geographic networks.
  • Client-Server Architecture: Distributes processing across independent server processes offering services and client processes consuming those services:

    • Advantages: Direct, efficient data distribution; leverages distributed, lower-cost networked hardware; highly modular, allowing dynamic server additions and upgrades.

    • Disadvantages: Lacks a shared global data model, which can lead to data duplication and conversion overhead; redundant server management; lacks a centralized lookup registry, making dynamic service discovery challenging.

    • Control Models:

  • Centralised Control: A single dominant sub-system coordinates runtime execution:

    • Call-Return Model: Top-down subroutine model where execution control flows sequentially downward through a nested functional hierarchy:

Call-Return Hierarchical Control Model
  • Manager Model: Applied in concurrent, real-time architectures where a centralized controller orchestrates starting, stopping, and synchronizing independent worker processes:

Real-Time Centralized Manager Control Model
  • Event-Driven Control: Driven by externally generated events outside the control of the receiving sub-system:

    • Broadcast Model: Events are published across an event bus or message handler. Sub-systems register interest in specific event types, and control shifts to relevant handlers when matching events occur. Sub-systems operate without knowing if or when an event will be processed:

Event Broadcast Control Model
  • Interrupt-Driven Model: Used in mission-critical real-time environments where low latency is essential. Hardware interrupts map via an interrupt vector directly to memory addresses of dedicated handlers, bypassing software queues. While this ensures fast response times, it is complex to code, validate, and debug:

Hardware Interrupt-Driven Control Model

Distributed Systems Architectures

  • Characteristics and Trade-Offs of Distributed Systems:

    • Advantages: Resource sharing across machines; openness through standardized communication interfaces; concurrent processing; scalability to handle growing workloads; fault tolerance through redundancy; location transparency.

    • Disadvantages: High architectural complexity; expanded security attack surfaces; management challenges across heterogenous nodes; unpredictable network latency and packet loss.

  • Middleware Technologies:

    • Off-the-shelf software sitting between the operating system and distributed application layers to manage component communications, data marshalling, and transaction coordination (e.g., Transaction Processing Monitors, data conversion tools, distributed communication controllers).

  • Architectural Topologies:

    • Multiprocessor Systems: The simplest distributed topology, where the application is partitioned into discrete processes executing across physical processors:

Multiprocessor Traffic Control System Architecture
  • Distributed Object Architectures: Eliminates the structural distinction between clients and servers. Every object exposes services and consumes services from other objects across an Object Request Broker (ORB).

  • Client-Server Architectures: Distinct client processes make structured requests to dedicated server processes over a network.

    • Client-Server Distribution Paradigms:

Thin-Client versus Fat-Client Distribution Models
  • Thin-Client Model:

    • The client machine runs only the presentation tier (graphical user interface).

    • The server executes all application processing logic and data management.

    • Use Case: Well-suited for migrating legacy systems to modern web interfaces.

    • Disadvantages: Imposes heavy processing and throughput demands on both the server and the network.

  • Fat-Client Model:

    • The client executes both presentation logic and core application processing.

    • The server handles only data storage, transactional integrity, and database management.

    • Use Case: Suitable for systems where client hardware capabilities and operating environments are known in advance.

    • Disadvantages: High administrative overhead, as software patches and version updates must be deployed to every individual client machine.

  • Three-Tier Client-Server Architecture:

    • Separates presentation, application processing, and data management into three distinct functional layers running on separate processors or physical infrastructure:

Three-Tier Architectural Model
  • Internet Banking System Example: Web browsers (Presentation Client) connect via HTTP to Web Servers running account management logic (Application Processing), which in turn query back-end Database Servers via SQL to update transactional records (Data Management):

Three-Tier Internet Banking System Implementation
  • Advantages: Balances network loads more effectively than thin clients while avoiding the deployment and management headaches of fat clients; supports horizontal scaling by allowing extra web or application servers to be added as traffic increases.