🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

03. SEN418 Software Architecture.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

ReadyLion

Uploaded by ReadyLion

Tags

software architecture design patterns software engineering application development

Full Transcript

SEN418 Business Application Design and Development Software Architecture Agenda â–ª Introduction â–ª Software Architectural Patterns â–ª Common Architectural Patterns â–ª Common Architectural Patterns - Comparison â–ª 4+1 View Model of Software Architecture â–ª...

SEN418 Business Application Design and Development Software Architecture Agenda â–ª Introduction â–ª Software Architectural Patterns â–ª Common Architectural Patterns â–ª Common Architectural Patterns - Comparison â–ª 4+1 View Model of Software Architecture â–ª Relation Between 4+1 View Model and Software Architectural Patterns â–ª Architecture Trade-off Analysis Method (ATAM) â–ª Workshop 2/31 Introduction â–ª Software architecture and software design are critical aspects of software engineering. â–ª They involve the high-level design of software systems and their components. â–ª The goal of software architecture and software design is to create systems that are reliable, scalable, maintainable, and performant. â–ª Architects and designers are responsible for creating and maintaining the software architecture and system design. â–ª Good software architecture and software design can have a significant impact on the success of a software project. 3/31 Software Architecture â–ª Software architecture is the high-level structure of a software system. â–ª It describes the system's components, their interactions, and their relationships. â–ª Software architecture provides a roadmap for software development. â–ª It is a blueprint for designing, implementing, and maintaining a software system. â–ª Good software architecture should be flexible, adaptable, and able to accommodate changing requirements. 4/31 Software Architectural Patterns â–ª Software architecture pattern is a reusable solution to a recurring software design problem. â–ª It represents a set of architectural design decisions that provide a solution to a particular problem. â–ª Architecture patterns define the structure of the system, the components, their relationships, and the principles and guidelines governing their interactions. â–ª Patterns promote the principles of good software design, including modularity, scalability, maintainability, and extensibility. â–ª By following a well-known architecture pattern, developers can benefit from the experience of others, reduce development time, and build more robust and reliable software systems. 5/31 Common Architectural Patterns 1. Layered (n-tier) Architecture Pattern 2. Client-Server Architecture Pattern 3. Peer-to-peer (P2P) Architecture Pattern 4. Microservices Architecture Pattern 5. Event-Driven Architecture (EDA) Pattern 6. Service-Oriented Architecture (SOA) Pattern 7. Model-View-Controller (MVC) Architecture Pattern 8. Repository Architecture Pattern 9. Publisher-Subscriber Architecture Pattern 10. Pipe and Filter Architecture Pattern 6/31 Common Architectural Patterns Layered (n-tier) Architecture Pattern â–ª Layered Architecture Pattern divides the system into distinct logical layers. â–ª Each layer has its specific responsibility, promoting modularity and separation of concerns. â–ª Layers can communicate only with the layer immediately above or below them, which improves maintainability and scalability. â–ª This pattern is commonly used in web-based applications and enterprise systems. â–ª Examples of layers include presentation, application, business logic, data access, and data storage layers. 7/31 Common Architectural Patterns Client-Server Architecture Pattern â–ª Client-Server Architecture Pattern is a distributed computing model where the client requests services or resources from the server, which responds by providing the requested service. â–ª This pattern enables high scalability and modifiability. â–ª The server can be optimized to handle large amounts of traffic, while the client can be lightweight and optimized for user experience. â–ª Examples of client-server applications include web applications, email systems, and file-sharing systems. â–ª The pattern is also known as a two-tier architecture. 8/31 Common Architectural Patterns Peer-to-peer (P2P) Architecture Pattern â–ª Peer-to-peer Architecture Pattern is a distributed system where all the nodes in the network are equal, and each node can act as both a client and a server. â–ª Each node can provide resources or services and request resources or services from other nodes. â–ª This pattern promotes scalability, fault tolerance, and self-organization. â–ª Peer-to-peer is commonly used in file-sharing systems, real-time data processing systems, and decentralized communication systems. â–ª Examples of peer-to-peer systems include BitTorrent, Bitcoin, and Skype. 9/31 Common Architectural Patterns Microservices Architecture Pattern â–ª Microservices Architecture Pattern involves breaking down a large, monolithic application into smaller, loosely coupled services that communicate with each other over a network. â–ª Each service is independently deployable, which allows for better scalability and fault isolation. â–ª Microservices are highly resilient, and it enables better fault tolerance since a failure in one service does not affect the entire system. â–ª This pattern is commonly used in large-scale web applications and enterprise systems. â–ª Examples of microservices include authentication, payment processing, and order management services. 10/31 Common Architectural Patterns Event-Driven Architecture (EDA) Pattern â–ª Event-Driven Architecture Pattern is a software architecture that emphasizes the production, detection, consumption, and reaction to events. â–ª An event-driven system is made up of event producers, event consumers, and an event broker that acts as an intermediary between them. â–ª This pattern is commonly used in systems that require high scalability, such as real-time data processing systems and financial trading systems. â–ª Examples of events include user actions, system alerts, and data updates. â–ª The pattern enables a system to be more responsive, adaptable, and fault- tolerant. 11/31 Common Architectural Patterns Service-Oriented Architecture (SOA) Pattern â–ª Service-Oriented Architecture Pattern is a software design pattern that structures a system as a collection of loosely coupled services. â–ª These services communicate with each other over a network and provide a set of functions to other services or client applications. â–ª This pattern promotes reusability, modularity, and scalability. â–ª Examples of services include authentication, payment processing, and order management services. â–ª This pattern is commonly used in enterprise systems and large-scale web applications. 12/31 Common Architectural Patterns Model-View-Controller (MVC) Architecture Pattern â–ª MVC Architecture Pattern separates an application into three interconnected components: Model, View, and Controller. â–ª The Model represents the application's data and business logic, the View displays the data to the user, and the Controller handles user input and updates the Model and View. â–ª This pattern promotes modularity and separation of concerns. â–ª Examples of MVC frameworks include Ruby on Rails and ASP.NET MVC. 13/31 Common Architectural Patterns Repository Architecture Pattern â–ª Repository Architecture Pattern is a pattern that separates the logic that retrieves data and maps it to entities from the business logic that acts on the entities. â–ª The repository acts as a mediator between the data source and the application code. â–ª This pattern promotes modularity, separation of concerns, and testability. â–ª Repository pattern is commonly used in enterprise applications and data-intensive applications. â–ª Examples of data sources include databases, web services, and files. 14/31 Common Architectural Patterns Publisher-Subscriber Architecture Pattern â–ª Publisher-Subscriber Architecture Pattern is a messaging pattern that involves the producers of messages (publishers) and the consumers of messages (subscribers). â–ª Publishers send messages to a broker or message queue, and subscribers receive messages from the broker. â–ª This pattern promotes modularity and loose coupling. â–ª Pub-Sub is commonly used in messaging systems, chat applications, and real-time data processing systems. â–ª Examples of publishers include chat applications, real-time financial trading systems, and social media platforms. 15/31 Common Architectural Patterns Pipe and Filter Architecture Pattern â–ª Pipe and Filter Architecture Pattern is a pattern that involves dividing a system into a set of independent filters that process data and pass it to the next filter through a pipe. â–ª Each filter is independent and performs a specific task, and the pipes connect the filters together. â–ª This pattern promotes modularity and reusability. â–ª Pipe and Filter is commonly used in data processing systems, image processing systems, and signal processing systems. â–ª Examples of filters include data converters, image processing filters, and noise reduction filters. 16/31 Common Architectural Patterns Comparison Microservices Architecture and Service-Oriented Architecture (SOA) â–ª Both focus on breaking down applications into services or components that can be developed, deployed, and maintained independently. â–ª The main distinction is that SOA often emphasizes enterprise-wide service integration and might use heavier protocols like SOAP, while microservices are more about building highly maintainable and scalable applications using lighter protocols such as REST. REST (Representational State SOAP (Simple Object Access Protocol) is Transfer) is an architectural style a protocol-based approach that uses XML that operates over HTTP, using for structured information exchange, methods like GET, POST, PUT, and supporting complex transactions and DELETE. It emphasizes simplicity equipped with comprehensive standards and scalability, utilizing URLs for including security. It's preferred for resources and often employing enterprise-level web services requiring JSON for data exchange. REST is strict contracts. favored for modern web applications due to its ease of use and lightweight nature. 17/31 Common Architectural Patterns Comparison Event-Driven Architecture (EDA) and Publish-Subscribe (Pub/Sub) Model â–ª EDA and Pub/Sub both revolve around the generation, detection, consumption, and reaction to events. â–ª In both patterns, components interact through events to achieve loose coupling. â–ª The Pub/Sub model can be seen as a specific implementation strategy of EDA, focusing on how components subscribe to and publish events. 18/31 4+1 View Model of Software Architecture â–ª The 4+1 View Model of Software Architecture is a popular approach for documenting software architectures. â–ª It provides five different views of the architecture, each representing a different perspective on the system. â–ª The four views are Logical, Development, Process, and Physical, with the fifth view being the Use Case view. â–ª This model provides a comprehensive view of the system and helps architects communicate design decisions to stakeholders. 19/31 4+1 View Model of Software Architecture Logical View â–ª The Logical View describes the functionality of the system from the end- user's perspective. â–ª It focuses on the high-level components of the system and their interactions. â–ª This view is useful for stakeholders who want to understand the system's functionality and how it meets their requirements. â–ª It also helps developers understand the system's architecture and the components they will be building. â–ª The Logical View is typically represented using a class diagram, sequence diagram, or a use case diagram. 20/31 4+1 View Model of Software Architecture Development View â–ª The Development View describes the system's organization into modules or components and how they are mapped to the implementation units such as files, libraries, and executables. â–ª It provides a view of the system that is useful for developers, project managers, and build and release engineers. â–ª This view helps developers understand the system's architecture and how it can be built and tested. â–ª It also helps project managers plan the development effort and track progress. â–ª The Development View is typically represented using a component diagram or a deployment diagram. 21/31 4+1 View Model of Software Architecture Process View â–ª The Process View describes the system's runtime behavior and how the components interact with each other at runtime. â–ª It focuses on the system's concurrency, synchronization, and performance characteristics. â–ª This view is useful for architects, performance engineers, and testers who need to understand the system's runtime behavior. â–ª It helps architects identify potential bottlenecks, race conditions, and synchronization issues. â–ª The Process View is typically represented using a sequence diagram, activity diagram, or a state-chart diagram. 22/31 4+1 View Model of Software Architecture Physical View â–ª The Physical View describes the physical structure of the system and how it is deployed across hardware and network infrastructure. â–ª It focuses on the system's scalability, availability, and security characteristics. â–ª This view is useful for system administrators, network engineers, and security engineers. â–ª It helps them understand how the system is deployed, how it can be scaled up or down, and how it can be secured. â–ª The Physical View is typically represented using a deployment or a network diagram. 23/31 4+1 View Model of Software Architecture Use Case View â–ª The Use Case View describes the system's functionality from the end-user's perspective using use cases. â–ª It provides a view of the system that is useful for business analysts and requirements engineers. â–ª This view helps them understand the system's functionality and how it meets the user's requirements. â–ª It also helps developers understand the system's requirements and how they can be implemented. â–ª The Use Case View is typically represented using a use case diagram or a use case narrative. 24/31 Relation Between 4+1 View Model and Software Architectural Patterns â–ª The 4+1 view model and software architectural patterns are related in that they both provide guidance for designing software systems at different levels of abstraction. â–ª The 4+1 view model provides a conceptual framework for describing a software system from multiple perspectives, including the logical, development, process, physical, and use case perspectives. This model can help to ensure that all stakeholders in a project have a clear understanding of the system's architecture and design. â–ª Software architectural patterns, on the other hand, provide specific solutions to common architectural problems that arise in software systems. These patterns are often implemented within one or more of the views in the 4+1 view model. â–ª For example, the Layered architecture pattern can be used to organize the logical view of a system, while the Client-Server architecture pattern can be used to organize the physical view of a system. Similarly, the Model-View-Controller (MVC) pattern can be used to organize the development view of a system. â–ª In this way, the 4+1 view model and software architectural patterns can work together to provide a comprehensive approach to designing and building software systems. 25/31 Architecture Trade-off Analysis Method (ATAM) â–ª The ATAM is a method for evaluating software architectures against multiple quality attributes or non-functional requirements, such as scalability, reliability, maintainability, and performance. â–ª The ATAM approach helps to identify risks and trade-offs associated with different architectural decisions and provides a framework for making informed decisions. â–ª The process involves multiple steps, including defining quality attribute scenarios, evaluating the architecture against the scenarios, and identifying trade-offs and risks. â–ª The ATAM approach is iterative and encourages feedback from stakeholders, allowing for adjustments and improvements to be made to the architecture. 26/31 A Sample Scenario with ATAM â–ª Scenario: A company is planning to develop a new e-commerce platform. The platform will allow customers to purchase products and services online, and it will also include features such as a shopping cart, order tracking, and a customer service portal. The company wants the platform to be scalable, reliable, and secure, with fast response times and high availability. â–ª ATAM Analysis: Step 1: Identify Quality Attribute Scenarios Step 2: Evaluate the Architecture Step 3: Identify Trade-Offs and Risks Step 4: Refine the Architecture Step 5: Iterate and Improve 27/31 A Sample Scenario with ATAM â–ª Step 1: Identify Quality Attribute Scenarios The quality attribute scenarios for the e-commerce platform could include: o Scalability: The platform should be able to handle a large number of concurrent users and transactions, and it should be able to scale up or down as needed. o Reliability: The platform should be highly available and reliable, with minimal downtime and data loss. o Security: The platform should be secure, with strong authentication and authorization mechanisms, and protection against common security threats such as SQL injection and cross-site scripting. o Performance: The platform should have fast response times and high throughput, with minimal latency and network overhead. 28/31 A Sample Scenario with ATAM â–ª Step 2: Evaluate the Architecture The architecture of the e-commerce platform could be evaluated against the quality attribute scenarios using various methods, such as architectural reviews, simulations, or prototypes. The evaluation could focus on different architectural elements, such as the system's components, interfaces, or data flows. â–ª Step 3: Identify Trade-Offs and Risks Based on the evaluation, the team could identify potential trade-offs and risks associated with the architecture. For example, the use of a distributed architecture could improve scalability and reliability but could also introduce performance overhead and security risks. The use of caching and load balancing techniques could improve performance but could also increase complexity and maintenance costs. 29/31 A Sample Scenario with ATAM â–ª Step 4: Refine the Architecture Based on the identified trade-offs and risks, the team could refine the architecture to address the issues and improve the quality attributes. For example, the team could use a combination of caching, load balancing, and content delivery network (CDN) techniques to improve performance while reducing complexity. They could also implement security measures such as encryption, access controls, and firewalls to mitigate security risks. â–ª Step 5: Iterate and Improve The ATAM process is iterative and encourages feedback from stakeholders, allowing for adjustments and improvements to be made to the architecture. The team could repeat the evaluation and refinement process to further improve the quality attributes and address any new trade-offs or risks that may arise. 30/31 Workshop Designing a Scalable E-commerce Platform Background: â–ª You've been tasked with designing the software architecture for an up-and-coming e- commerce platform, "ShopFast." The platform aims to provide a seamless shopping experience for customers with features like product browsing, search functionality, user reviews, shopping carts, and online payment processing. ShopFast expects rapid growth in user traffic and product listings, necessitating a highly scalable, maintainable, and secure architecture. Requirements: Challenges: â–ª Scalability: Must support scaling to accommodate increasing loads,â–ª Handling fluctuating and potentially massive especially during peak shopping seasons. traffic volumes. â–ª Performance: Should ensure fast response times for search queriesâ–ª Managing a large and growing inventory of and page loads. products. â–ª Availability: Needs to be highly available to minimize downtime and â–ª Ensuring quick and relevant search results. maintain a positive user experience. â–ª Protecting sensitive user data. â–ª Security: Must secure user data, especially payment information, â–ª Facilitating smooth deployment of new against breaches and attacks. features without significant downtime. â–ª Maintainability: Should be easy to update and maintain, allowing for quick feature rollouts and bug fixes. â–ª Suggest two patterns. Discuss requirements, address challenges. â–ª Compare two patterns in terms of requirements. 31/31

Use Quizgecko on...
Browser
Browser