Software Architecture: Foundations, Theory, and Practice - Week 5 PDF

Summary

These lecture notes cover foundational concepts in software architecture for a course at Ankara University in the 2024-2025 academic year. The material focuses on fundamental concepts like architecture design process, software components, connectors and various architectural styles.

Full Transcript

YMH359 2024-2025 Güz YMH359 Yazılım Tasarım ve Mimarisi Mimari Tasarım Süreci: Temel Kavramlar Bu ders notunun hazırlığı için kullanılan Kaynaklar:...

YMH359 2024-2025 Güz YMH359 Yazılım Tasarım ve Mimarisi Mimari Tasarım Süreci: Temel Kavramlar Bu ders notunun hazırlığı için kullanılan Kaynaklar: Medvidovic, N., & Taylor, R. N., Software Architecture: Foundations, Theory, and Practice, Chapter 3 SOFTWARE ARCHITECTURE BASIC CONCEPTS Definition: A software system’s architecture is the set of principal design decisions about the system Software architecture is the blueprint for a software system’s construction and evolution Design decisions encompass every facet of the system under development Structure Behavior Interaction: how systems components work together to fulfill requirements. Non-functional properties Software architecture refers to the high- level structure or design of a software system. It encompasses the organization of the system’s components, the relationships between them, and the principles guiding their design and evolution. Key aspects include: Components: The individual modules or subsystems that make up the system. Interactions: The communication and data flow between components. Design principles: Guidelines and patterns used to ensure scalability, performance, maintainability, and security. Architectural styles: Common patterns like client-server, microservices, or event- driven architectures. Architecture.. Is an abstraction-taming the complexity Examples of "taming the complexity" in software: Modularization: Breaking a large, complex system into smaller, manageable modules or components. Each module can be developed, tested, and maintained independently. Every system has one- documentation is critical. Includes behavior an elements behavior influences another Basic Concepts Software component Connector Configuration Architectural pattern, architectural style Stakeholders of an architecture Elements of Software Architecture A software system’s architecture typically is not (and should not be) a uniform monolith Explanation: A well-designed system should be modular, composed of distinct components or services, rather than a single, large, indivisible structure. Modular systems are usually more scalable, maintainable, and adaptable, making it easier to update or replace parts without disrupting the entire system. A software system’s architecture should be a composition and interplay of different elements Elements of Software Architecture Components Connectors Configuration Topologies System Models A component is a modular part of a software system that encapsulates a specific functionality or behavior. Components are designed to be reusable, maintainable, and independent, allowing developers to focus on one aspect of a system without being tightly coupled to other parts Components typically provide application-specific services Example: In a web application, a payment processing component that handles transactions and communicates with external payment gateways. Characteristics: Encapsulation: Hides the internal workings and only exposes a public interface. Reusability: Can be used across different systems or projects. Replaceability: Can be replaced or updated without affecting other components. In complex systems interaction may become more important and challenging than the functionality of the individual components Definition A software connector is an architectural building block tasked with effecting and regulating interactions among components It defines the interaction protocols, data formats, and methods for sending and receiving messages or data. In many software systems connectors are usually simple procedure calls or shared data accesses Characteristics: Communication: Manages the exchange of information between components. Protocol Definition: Specifies the rules and formats for interaction (e.g., API calls, message formats). Example: A REST API connector that allows a frontend component to make HTTP requests to a backend service to fetch or update data. Component and Connector C&C focus on the way the elements interact with each other at runtime Runtime Structures: Services, Client, Peer, Server Component and Connector C&C focus on the way the elements interact with each other at runtime Runtime Structures: Services, Client, Peer, Server Useful Structures - C&C Category Service Structure Concurrency Structure Units = services, microservices Units = components coordination mechanism: components are arranged into logical orchestration, choreography threads a system composed of components helps to determine opportunities for that may have been developed parallelism and the locations where anonymously and independently of resource contention may occur (race each other conditions) https://jenkov.com/tutorials/java-concurrency/concurrency-models.html Useful Structures - C&C Category Service Structure Units = services, microservices coordination mechanism: orchestration, choreography a system composed of components that may have been developed anonymously and independently of each other Mikroservisle r- Örnek Mikroservisler sayesinde, bir sistemi parçalara bölerek, her parça için ayrı ayrı test etme, dağıtma ve yönetme imkanı sağlar. her parça için ayrı ayrı geliştirme imkanı sağlar. Bu sayede, ekip üyelerinin uzmanlık alanlarına göre parçalara dağıtılması ve farklı diller veya teknolojilerle geliştirilmesi mümkündür. Mikroservisler ayrıca, esneklik Mikroservisler, sağlamlık ve sağlar. Her parça, ayrı ayrı güvenlik sağlar. Her parça, ayrı ayrı çalıştırılabilir veya kapatılabilir, çalıştırıldığından, bir parçanın arızası böylece sistem ihtiyaçlarına göre diğer parçaları etkilemez. Ayrıca, her dinamik olarak yapılandırılabilir. parça, ayrı ayrı güvenlik önlemleri alınabilir Mikroservisle r- Örnek 1.Uber: Uber, mikroservis yazılım tasarımını kullanarak, sistemi dinamik ve ölçeklenebilir hale getirir. Uber, sistemini, sürücü ve yolcu hizmetleri, ödeme, konum takibi, push bildirimleri gibi birçok parçaya böler. Bu parçalar arasındaki iletişim, Uber tarafından geliştirilen ve açık kaynak olarak Concurrency Structure Useful Structures - C&C Category Units = components components are arranged into logical threads helps to determine opportunities for parallelism and the locations where resource contention may occur (race conditions) In the parallel workers concurrency model a delegator distributes the incoming jobs to different workers. Each worker completes the full job. The workers work in parallel, running in different threads, and possibly on different CPUs. https://jenkov.com/tutorials/java-concurrency/concurrency-models.html Basic Concepts -I A Software Component - encapsulates a subset of the system's functionality and/or data - restricts access to that subset via an explicitly defined interface - has explicitly defined dependencies on its required execution context Basic Concepts -II A Software Connector - architectural building block tasked with effecting and regulating interactions among components In many systems, usually simple procedure calls or shared data accesses, ore complex ones possible - eg. procedure call, shared memory, message passing Basic Concepts - III A Configuration - topology, is a set of specific associations between the components and connectors Topoloji, genellikle bir sistemin, ağın veya verilerin düzenleniş biçimini ve rnaara bileşenlerin birbirleriyle olan ilişkilerini tanımlayan bir terimdir. Basic Concepts - IV System Model: An Architectural Style a named collection of architectural design decisions that - are applicable in a given development context - constrain architectural Use the Pipes and design decisions that are Filters architectural style to specific to a particular divide a larger processing task system within that into a sequence of smaller, context independent processing steps - elicit beneficial qualities in each resulting system (Filters) that are connected by - eg. pipes and filters, channels (Pipes). client-server Example- Pipe and Filter Style Requirements: The message is encrypted to prevent eavesdroppers from spying on a customer's order The messages contain authentication information in the form of a digital certificate to ensure that orders are placed only by trusted customers. In addition, duplicate messages from external parties should be avoided. Basic Concepts - IV System Model: An Architectural Style a named collection of architectural design decisions that - are applicable in a given development context - constrain architectural design decisions that are specific to a particular system within that context - elicit beneficial qualities in each resulting system - eg. pipes and filters, client-server Basic Concepts - IV Three-tiered system A three-tiered system is a common architectural pattern that separates an application into three distinct layers, each with its own specific responsibilities Example of a Three-Tiered System: E-commer Website Basic Concepts - IV Presentation Layer (Client Tier): Role: The user interface where users interact with the system. Technology: Often implemented using web technologies like HTML, CSS, and JavaScript frameworks Application(e.g., LayerReact, Angular, (Business Vue).Tier): Logic Role: Contains the core business logic and processes that define how data is managed, manipulated, and controlled. Technology: Typically implemented using a backend language and framework, such as Node.js, Python (Django), Java (Spring), or.NET. Data Layer (Database Tier): Role: Stores and retrieves data for the application, including user profiles, product information, orders, and transaction history. Stakeholders in a System’s Architecture Architects Developers Testers Managers Customers Users Vendors (Tedarikçi) Description Software Architect Role PMBOK Knowledge Area Project Quality Ensuring that the project will satisfy the Management needs for which it was undertaken Design for quality and track the system against the design. Define quality metrics. Project Human Ensuring that the project makes the most Define the required technical skill sets. Mentor Resource effective use of the people involved with the developers about career paths. Recommend Management project training. Interview candidates. Project Ensuring timely and appropriate generation, Ensure communication and coordination among Communications collection, dissemination, storage, and developers. Solicit feedback as to progress, Management disposition of project information problems, and risks. Oversee documentation. Project Risk Identifying, analyzing, and responding to Identify and quantify risks; adjust the architecture Management project risk and processes to mitigate risk. Project Acquiring goods and services from outside Determine technology requirements; recommend Procurement the organization technology, training, and tools. Management Architect's Role in Supporting PM Knowledge Areas Software Architects Architects do their work in the context of a development project; they need to understand their roles and responsibilities from that perspective. The project manager and the architect have complementary roles: The manager runs the project from an administrative perspective, the architect runs it from a technical perspective. These roles intersect. Architectures are released in increments that are useful to stakeholders. Thus the architect needs to have a good understanding of the architecture's stakeholders and their information needs. Agile methodologies focus on incremental development. Over time, architecture and Agile have become indispensable References r Software Architecture: Foundations, Theory, and Practice, Chapter 3

Use Quizgecko on...
Browser
Browser