Lecture 06 Enterprise Architectures PDF
Document Details
Uploaded by FondArtInformel
TU Dublin
Tags
Summary
This lecture introduces various software/system architectures, including monolithic, N-tier, microservices, and event-driven architectures. It explains the key concepts, pros, and cons of each, providing a comparative analysis to aid in selecting the appropriate architecture for different application needs.
Full Transcript
Software/System (Enterprise-Level) Architectures An Overview What is a software/system architecture? Any thoughts? What is a software/system architecture? It represents the design decisions related to overall system structure and behaviour. It helps stakeholders understand how the sy...
Software/System (Enterprise-Level) Architectures An Overview What is a software/system architecture? Any thoughts? What is a software/system architecture? It represents the design decisions related to overall system structure and behaviour. It helps stakeholders understand how the system will achieve essential (non-functional!) qualities like modifiability, availability, and security. Btw, did you notice that I missed the word enterprise-level? What is an enterprise-level software/system architecture? It represents the design decisions related to overall system structure and behaviour. It helps stakeholders understand how the system will achieve essential (non-functional!) qualities like modifiability, availability, and security. A particular subset, aimed to address the special needs of enterprise-level systems (E.g., large/huge volume of concurrent users). Example of Enterprise-level vs Non- Enterprise-Level Architecture Although the “Old” Microsoft Office and the newer Microsoft Office 365 have similar business functionality … They are two completely different animals! Why? Any thoughts? Example of Enterprise-level vs Non- Enterprise-Level Architecture Although the “Old” Microsoft Office and the newer Microsoft Office 365 have similar business functionality … They are two completely different animals! Why? Any thoughts? One is personal productivity software; the other is enterprise-level software! (As of March 2023, there are 300+ million monthly active users!). Benefits of using a software/system architecture? Easier to predefine the core functionalities of your application: – It helps sketch out the basic attributes and behaviour of your application. Easier to achieve a higher level of agility: – It enables to have less technical debt/complexity when doing changes. Identify and fix (or prevent) issues ahead of time: – It offers prior knowledge about how a system and its components will work. It can be tailored to the particular needs of your application. Easier to get consistent quality: – It enables you to create better, more-reusable, and easier-to-maintain code. Boost productivity: – As a result of all of the above, it can be highly improved! Monolithic Architecture The application is designed as a single unit (i.e., all functionalities are weaved together): Pros: Its simplicity often makes it the go-to choice for small-scale applications, working without the burdens of distributed systems. Cons: As the application evolves/expands, its complexity increases, complicating modifications. Changes in one part can unintentionally impact other parts of the application, leading to system-wide issues. Scalability is also problematic, as it the entire application needs scaling (instead of just the high-demand functionality). N-Tier Architecture The application is designed in layers (aka tiers). Each has a specific responsibility. The most common is the 3-Tier (Frontend, Backend, Database layers): Pros: Cons: Separation of Concerns. Performance Overhead. Reusability. Increased Complexity. Maintainability. Rigidity. Testability. Potential For Misuse. Encapsulation. Flexibility. Btw, have you heard the term “technical debt”? What is technical debt? Or debt? Any thoughts? What is technical debt? Debt: A sum of money that is owed or due. Often with interests! What is technical debt? The “cost” of making design decisions that are sub-optimal (i.e., we know will need to be addressed in the future!) to get what we need into production sooner. Often with interests! Microservices Architecture The application is broken into small, independent, and modular components called microservices. Each is responsible for a specific functionality, runs its own process, and communicates with the exterior world via API (web) requests. Pros: Cons: Scalability. Increased Complexity. Flexibility. Communication Overhead. Fault Tolerance. Data Consistency. Easier Maintenance. Higher deployment and Faster Development and management effort. Deployment. Security risks. Have you heard of SOA? Microservices is its evolution. More info here. Comparison of Architectures https://www.youtube.com/watch?app=desktop&v=qbDkBPpmjJM Event-Driven Architecture (EDA) It centres around the concept of events, where components communicate by producing and consuming events. Events represent meaningful occurrences within a system and can trigger actions in other parts of the application. Pros: Cons: Scalability. Increased Complexity. Loose Coupling. Debugging/Troubleshooting Asynchronous Processing. Challenges. Fault tolerance. Event Ordering. Easier Integration. Data Consistency. Messaging Overhead. Monitoring, Testing, and Validation Challenges. Asynchronous vs Synchronous Synchronous: Attend a real-time class. Have a video call with a friend. Execute an SQL query in a database. Get content from most Web servers (e.g., Apache). Asynchronous Examples: Send an email. Send a FB/WhatsApp message. Send a (REST) message to a MQ (MessageQueue) server. Get content from some Web servers (e.g., NGINX). To learn more about REST go here. Model-View-Controller (MVC) A design pattern used to separate an application's logic into 3 distinct layers: Model (data logic), View (user interface), Controller (business logic, handles user input, and orchestrates the Model and View). Although it seems like the N-Tier architecture, they are different (as MVC can be applied to any architecture). Client – Server Architecture Clients interact with a centralized server, which provides the service. Pros: Cons: Simplicity. Single Point Of Failure (SPOC). Centralized Management. Limited (Vertical) Scaling. Relational databases are often not easily horizontally scalable. So, they are single- server components in many architectures. Peer-to-Peer Architecture It involves a network of peers that act as both clients and servers. Each peer can request and provide services to other peers without relying on a central authority or coordinator (i.e., autonomous). The peers self-organize and can join/leave the network at any time. Lecture vs Study Group Pros: Cons: Fault tolerance. Manage and Coordination Challenges. Scalability. Performance Variability. Security Risks. Serverless Computing Which architecture is better? Any thoughts? Which architecture is better? Microservices Serverless Monolithic … etc. Factors to Consider When Selecting a Software/System Architecture Team Expertise Complexity of the Problem Domain – E.g., a relatively “simple” application may benefit from layered architectures. Performance Requirements/Scalability: – E.g., event-driven architectures is relatively straightforward to scale. Security and Compliance – E.g., microservices might introduce security challenges due to increased network communication. Same with 3rd party components/services. Costs – Licenses, training, operational cost, etc. Project Requirements – E.g., it is explicitly stated to build a specific type of app. (web, mobile, etc.). That is all, folks!