Study Notes - SA
Study Notes - SA
3. Architecture Activities.
a. Making a business case
b. Identifying architecturally significant requirements
c. Designing/selecting architecture
d. Documenting and communicating architecture
e. Analysing and evaluating architecture
f. Implementing/testing the system
g. Ensuring implementation adherence
5. Architectural Structures
· Module Structures: Partition systems into implementation units (modules) that assign
specific responsibilities.
· Component-and-Connector (C&C) Structures: Focus on runtime entities (components)
and their interactions (connectors).
· Allocation Structures: Map software elements to environments like organizational,
developmental, and execution contexts.
6. Useful Structures
· Decomposition Structure: Shows hierarchical breakdown of modules into submodules.
· Concurrency Structure: Focuses on parallelism and resource contention in runtime.
· Deployment Structure: Maps software to hardware units, crucial for performance,
security, and availability
7. Architectural Patterns
· Layered Pattern: Modules are organized in layers, providing unidirectional uses relations.
· Client-Server Pattern: Components are clients and servers, with connectors as protocols and
messages.
· Shared-Data (Repository) Pattern: Components access and modify a shared repository, often
using SQL protocols.
· Multi-Tier Pattern: Distributes system components across different hardware and software
tiers.
· Functional Requirements: What the system must do (behaviour and runtime responses).
· Quality Attribute Requirements: Annotate functional requirements (e.g., speed, resilience,
learnability).
· Constraints: Design decisions with no degrees of freedom (already decided).
1. What is Availability?
· Definition:
· Availability is the property of software being present and ready to perform its tasks when
needed.
· Encompasses reliability by adding the concept of recovery (repair).
· Core Objective:
· Minimize service outage time by mitigating faults.
· Ensure the system can endure faults, preventing them from causing failures or limiting their
impact.
· Sample Scenario:
· Example: A heartbeat monitor detects a nonresponsive server during normal operations,
informs the operator, and maintains operation without downtime.
Prevent Faults
· Allocation of Responsibilities:
· Identify and assign responsibilities that need high availability.
· Ensure logging, fault notification, disabling fault sources, temporary unavailability, fault
fixing/masking, and degraded operation capabilities.
· Coordination Model:
· Ensure coordination mechanisms can detect and handle faults.
· Consider properties like guaranteed delivery, operation under degraded communication,
and support for artifact replacement.
· Assess coordination behavior during different operational states (startup, shutdown,
overloaded).
· Data Model:
· Identify data abstractions critical for availability.
· Ensure operations on these abstractions can be disabled, made temporarily unavailable,
or fixed/masked during faults.
· Example: Cache write requests if a server is unavailable.
· Mapping Among Architectural Elements:
· Identify artifacts that may produce faults.
· Ensure flexible mapping/re-mapping for fault recovery, such as:
· Reassigning processes to different processors.
· Activating replacement processors or storage.
· Reinstalling systems based on delivery units.
· Managing redundant component mappings.
· Resource Management:
· Identify critical resources needed during faults.
· Ensure sufficient remaining resources to handle fault responses (logging, notifications,
disabling sources).
· Example: Large input queues to buffer messages during server failures.
· Choice of Technology:
· Select technologies that aid in fault detection, recovery, and component reintegration.
· Evaluate availability characteristics of chosen technologies (fault recovery capabilities,
potential faults introduced).
5. Summary
· Availability ensures the system remains operational and accessible when faults occur.
· Tactics are divided into:
· Detect Faults: Identify issues promptly.
· Recover from Faults: Restore functionality or minimize impact.
· Prevent Faults: Reduce the likelihood or impact of faults.
· Design Considerations:
· Allocate responsibilities effectively.
· Choose appropriate coordination models.
· Design robust data models.
· Ensure flexible mappings and resource management.
· Make informed binding time and technology choices.
Module 2 – L3: Performance
1. Understanding Performance
3. Performance Tactics
4. Design Checklists
· Responsibilities: Identify heavy-load tasks and manage threads, queues, and resources.
· Coordination Model: Choose suitable communication mechanisms (thread-safe,
asynchronous).
· Data Model: Consider multiple data copies and processing efficiencies.
· Architectural Elements: Optimize component locations and processing assignments.
Module 2 – L4: Usability
What is Usability?
· Usability refers to how easy it is for users to accomplish their tasks and the support the system
provides.
· Key areas of usability include:
· Learning system features
· Efficient usage
· Minimizing errors
· Adapting to user needs
· Increasing user confidence and satisfaction
· Components:
· Source: End user
· Stimulus: User actions (learning, minimizing errors, configuring the system)
· Environment: Runtime or configuration
· Artifacts: System components involved
· Response: System should provide needed features or anticipate needs
· Response Measures: Task time, errors, user satisfaction, etc.
3. Usability Tactics
· Responsibilities: Ensure users learn, adapt, and recover from errors effectively.
· Coordination Model: Assess how timely and consistent system responses aid usability.
· Data Model: Ensure data abstractions support user operations like undo/cancel.
· Mapping Among Architectural Elements: Identify how visible architecture affects usability.
· Resource Management: Ensure resource limits don’t hinder task completion.
· Binding Time: Allow user control over configuration decisions.
· Choice of Technology: Choose technologies that support usability features.
5. Summary of Usability
· Usability architecture allows user initiative (e.g., canceling commands) and requires models of
the user and system to predict responses.
· Definition: Ability to protect data from unauthorized access while ensuring authorized access.
· Attacks: Unauthorized attempts to access, modify, or deny services.
2. CIA Triad
3. Supporting Characteristics
5. Security Tactics
· Detect: Monitor traffic patterns, verify message integrity, and check for anomalies.
· Resist: Identify, authenticate, and authorize actors; limit access and encrypt data.
· React: Revoking access, locking resources, and notifying personnel.
· Recover: Keep audit trails and restore systems post-attack.
Definition: Modifiability refers to the ease and cost of making changes to a system.
· Key Questions:
1. What can change?
2. What is the likelihood of change?
3. When and who will make the changes?
General Scenario
· Allocation of Responsibilities:
· Identify likely changes and impact on responsibilities.
· Group related changes within the same module.
· Coordination Model:
· Analyze which functionalities can change at runtime and how.
· Use models like publish/subscribe to reduce coupling.
· Data Model:
· Assess potential changes to data abstractions and their operations.
· Ensure proper privileges for modifications.
· Mapping Among Architectural Elements:
· Evaluate if the mapping of functionality to computational elements can change.
· Resource Management:
· Analyze impacts of changes on resource usage and management.
· Binding Time:
· Determine optimal points for changes and choose appropriate defer-binding mechanisms.
· Choice of Technology:
· Select technologies that facilitate modifications and are easy to update.
Module 2 – L6: Interoperability
Interoperability Overview
General Scenario
Testability Overview
· Definition: Testability is the ease with which software can demonstrate faults through
execution-based testing. It focuses on the likelihood of detecting faults during testing.
· Key Considerations:
· Control inputs and manipulate internal states.
· Observe outputs and internal states.
Limit Complexity:
Key Topics
Designing an Architecture
Agility in Architecture
Agile Principles
· Techniques like ATAM (Architecture Tradeoff Analysis Method) for evaluating architecture.
· Importance of addressing stakeholders' concerns.
Summary Points
· The Agile Manifesto prioritizes collaboration, customer focus, and rapid delivery.
· Successful large-scale projects require a blend of Agile practices and sound architectural
principles.
· Understanding when and how much architecture to implement is crucial for project success.
MODULE 4 : VIEWS
1. Architecture Views
2. Documenting Architecture
· Purpose: Document relevant views and general documentation applicable across views.
· Challenge: Architecture documents often don’t meet the concerns of all stakeholders (end-
users, engineers, developers, project managers).
· Components:
· Logical View: Object model, focuses on functional requirements. Notation: Booch.
· Process View: Captures concurrency and synchronization aspects. Focuses on non-functional
requirements.
· Development View: Static organization of software in development. Focus on software module
organization.
· Physical View: Maps software onto hardware, considers reliability and performance.
5. Iterative Process
· Not all architectures require all views.
· Use a scenario-driven approach to develop the system.
· Maintain architectural integrity through software design guidelines.
6. Annotations
· Industry Use: Successfully implemented in fields like Air Traffic Control and Telecom.
· Challenge: Lack of integration tools leads to inconsistency during maintenance.
Layered Architecture Overview
· Definition: A design pattern that separates an application into distinct layers, each with specific
responsibilities.
Typical Layers
1. Presentation Layer:
· Handles user interactions.
· Techniques:
· Caching: Client-side vs. Server-side.
· AJAX: For asynchronous communication.
· Responsive Design: Adapts layout for different devices.
1. Business Layer:
· Contains business logic and rules.
· Techniques:
· Facade Pattern: Simplifies interface for complex subsystems.
· Session Management: Maintains user session state.
· Workflow Engines: Manages business processes.
1. Data Access Layer:
· Interacts with the database.
· Techniques:
· Connection Pooling: For efficient database access.
· Object-Relational Mapping (ORM): Simplifies data handling (e.g., Hibernate).
· Transactions: Ensures data integrity.
1. Services Layer:
· Exposes functionality to external applications.
· Handles communication issues and requests.
· Presentation Layer:
· Use AJAX for dynamic content loading.
· Implement client-side caching for user preferences.
· Business Layer:
· Use application façade for internal module hiding.
· Implement session management (cookies, server-side sessions).
· Data Layer:
· Use stored procedures for performance.
· Implement parameterized SQL queries to prevent SQL injection.
Additional Concepts
· Aspect-Oriented Programming: For cross-cutting concerns like logging, security, and auditing.
· SSL & Security: Ensure secure data transmission between client and server.
· Session Management: Maintain user state across multiple requests.
Exercises
1. Identify components of a Departure Control System (DCS) in each layer.
2. Propose performance improvements for a slow-loading citizen registration screen.
3. Define the service layer components for a hotel reservation system.
4. Design a façade for a logistics system to abstract module interactions.
1. Evaluation Factors
· Forms of Evaluation:
· By the Designer: Ongoing assessments during key design decisions.
· Peer Review: Collaborative evaluations at any design phase.
· Outsider Analysis: Independent evaluations by external experts.
· Steps:
1. Reviewers define quality attribute scenarios.
2. Architect presents the architecture for understanding.
3. Scenarios are evaluated against the architecture.
4. Capture potential problems and decide on their acceptance.
4. Outsider Analysis
1. Code Drift
3. Code Templates
5. Additional Techniques
· Utility Tree:
· Use a utility tree to identify high-priority scenarios that have significant business value and
architectural impact. These scenarios translate into high-priority test cases.
· Module Interactions:
· Architecture outlines which modules interact, aiding in identifying integration test cases.
· Dependency Identification:
· Understanding module dependencies helps in determining the modules required for integration
testing.
5. Experience Sharing
· Examples:
· ARMIN (Architecture Reconstruction and Mining)
· Dali
· Lattix
· SonarQube
· Structure101
· View Fusion:
· Combine static (source code) and dynamic (execution trace) views for a comprehensive
architecture overview.
· Architecture Analysis:
· Validate the correctness of architectural elements against defined constraints (e.g., layer
interactions).
5. Case Study: "Vanish" System
6. Experience Sharing
1. Separation of Concerns:
· Each layer (Presentation, Business Logic, Data Access) has distinct responsibilities, simplifying
maintenance and development.
1. Reusability:
· Components can be reused across different applications, reducing redundancy and
development time.
1. Ease of Testing:
· Isolated layers allow for easier unit testing, ensuring reliability and quick identification of issues.
1. Scalability:
· New features can be added to a specific layer without impacting others, facilitating growth as
business needs change.
b. How would you go about implementing layered architecture in this case? Explain with a
diagram. [3 Marks]
· Diagram: Create a visual representation of the layered architecture with the following layers:
· Presentation Layer: User interface components for inventory management and order
processing.
· Business Logic Layer: Implements FIFO inventory rules and manages orders.
· Data Access Layer: Handles CRUD operations for inventory data.
· Database: Where raw materials and finished products are stored.
· Explanation:
· Presentation Layer: Interfaces for warehouse management, sales order processing, and
inventory checks.
· Business Logic Layer: Manages inventory logic (e.g., FIFO handling, sales order fulfillment).
· Data Access Layer: Provides data access methods, abstracts database interactions, and
ensures data integrity.
c. Is architecture evaluation in conflict with Agile processes? Explain how an Agile process would
work in the above case. Your answer should cover at least 3 Agile principles. [3 Marks]
· No Conflict: Architecture can evolve during the Agile process, adapting to new insights and
requirements.
· Agile Principles:
1. Customer Collaboration: Frequent discussions with stakeholders ensure the system meets
inventory management needs and adapts to feedback.
2. Responding to Change: The architecture can be adjusted based on changing business
priorities, such as new product lines or market demands.
3. Working Software: Regular iterations allow teams to deliver functional features incrementally,
integrating new architecture as needed.
d. Explain with rough sketches how you would use Kruchten’s 4+1 architectural view model
concerning the above case study. [3 Marks]
· Utility Services:
· Tactic: Mocking
· Explanation: Simulate dependencies for utility services during testing, allowing for isolated
tests.
· Application Services:
· Tactic: Logging
· Explanation: Implement logging to capture interactions, which aids in debugging and
monitoring performance.
· Configuration Services:
· Tactic: Parameterization
· Explanation: Allow runtime adjustments to configurations without code changes, enhancing
adaptability for testing.
· Diagram: Illustrate the service layers with respective tactics applied.
b. “Utech is replaced by GoLearn” – Justify the role of usability tactics in this context. [2 Marks]
· Justification:
· Usability tactics improve user engagement by providing intuitive interfaces and personalized
learning experiences. This contrasts with Utech’s closed system, which lacked user-friendly
features. Effective usability can lead to higher adoption rates among students and educators.
c. Please give examples of 3 design decisions for performance that you would take for the
services described in the above case. The answer must be in the context of the case study given.
[3 Marks]
1. Caching:
· Use caching for frequently accessed educational content to reduce response time and server
load.
1. Load Balancing:
· Implement load balancing to distribute user requests evenly across multiple servers, enhancing
availability and performance.
1. Service Granularity:
· Design services to be fine-grained, enabling efficient processing and quicker response times by
loading only necessary components for each request.
· Goals:
· Enhance security to protect patient data.
· Improve usability for staff and patients, ensuring smooth workflows and easy access to
information.
b. What are the roles and responsibilities of stakeholders involved in the system (doctors, nurses,
patients, administrators)? [2 Marks]
· Doctors:
· Manage patient care, access and update medical records, and ensure data security.
· Nurses:
· Provide daily patient care, monitor health statuses, and assist in record keeping.
· Patients:
· Access personal health information, manage appointments, and provide feedback on care.
· Administrators:
· Oversee the system’s functionality, manage user access, and ensure compliance with
healthcare regulations.
c. Describe using diagrams 4 brainstorm scenarios for potential security breaches and usability
issues. [4 Marks]
· Diagrams:
1. Unauthorized Access: An external hacker breaches the system to access sensitive patient
data.
2. Data Breach: Insufficient encryption leads to leaked patient information.
3. System Downtime: Users are unable to access the system due to server failure.
4. User Error: Staff accidentally delete critical patient records.
· Explanation: Discuss the implications of each scenario for patient safety and system integrity.
d. What methodology have you studied in the course to assist in prioritizing scenarios for a small
project where the time available is short? [1 Mark]
· Methodology:
· Use the MoSCoW method (Must have, Should have, Could have, Won't have) to prioritize
scenarios based on their importance and urgency.
e. Prioritize scenarios based on their criticality, considering the potential impact on patient safety
and user experience. [1 Mark]
· Criticality Assessment:
1. Data Breach (Must have)
2. Unauthorized Access (Must have)
3. System Downtime (Should have)
4. User Error (Could have)
f. Is there any international standard for deciding what scenarios are to be given priority? [1 Mark]