1. Home
  2. Explore
  3. Computer Science
  4. Software Architecture Patterns

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Software Architecture Patterns

  • 90Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Layered Architecture
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is layered architecture?

Tap to flipClick to flipspace

An architecture that organizes an application into distinct layers, each with a specific responsibility.

Or swipe the card

90 cards

  1. What is layered architecture?

    An architecture that organizes an application into distinct layers, each with a specific responsibility.

  2. What responsibilities do the data, business, application, and presentation layers typically have?

    The data layer stores data; the business layer handles core logic; the application layer executes and coordinates tasks; and the presentation layer provides the user interface.

  3. What does separation of concerns mean in layered architecture?

    Each layer focuses on a distinct responsibility rather than combining unrelated concerns in one part of the application.

  4. How can layered architecture make software easier to maintain?

    Layers can be developed and maintained relatively independently, limiting the impact of changes to one responsibility.

  5. What other benefits can layered architecture provide?

    It can support scalability and flexibility and make troubleshooting easier.

  6. What can happen if a layered system has too many layers?

    The system can become unnecessarily complex.

  7. How can communication between layers affect performance?

    Communication across layers can create performance bottlenecks if it is not managed carefully.

  8. What are examples of applications that may use layered architecture?

    E-commerce platforms can separate browsing, payment processing, and other functions into layers; banking apps can separate account data, transactions, and the user interface.

  9. What is client-server architecture?

    A system in which multiple clients request resources or services from a central server that manages and provides access to them.

  10. What are the roles of the server and clients in client-server architecture?

    The server centrally manages and provides resources; clients request and use the server's resources or services.

  11. What are advantages of the centralized approach in client-server architecture?

    It can make maintenance easier and provide greater security and control over resources.

  12. What is the single point of failure risk in client-server architecture?

    If the central server fails, clients may lose access to the resources and services it provides.

  13. How can a client-server system reduce the impact of server failure?

    By using redundancy and backup mechanisms.

  14. How does email illustrate client-server architecture?

    The server stores email and manages sending and receiving, while an email app acts as a client that lets users access and manage messages.

  15. What is the defining idea of event-driven architecture?

    The system responds to events or changes, with events triggering actions rather than relying only on a fixed sequence of steps.

  16. What can count as an event in event-driven software?

    A user action, a sensor reading, or an internal system change can all serve as an event.

  17. Why is event-driven architecture useful for real-time applications?

    It can react to events as they occur, making it useful when actions require immediate responses.

  18. What are examples of applications suited to event-driven architecture?

    Stock trading platforms and online games can use it when events need immediate processing.

  19. What makes event-driven systems challenging to design and test?

    Events may be asynchronous and occur at the same time, making reliable behavior, debugging, and testing difficult.

  20. What are other examples of event-driven systems?

    Real-time analytics dashboards, fraud detection systems that trigger alerts, and car anti-lock braking systems that react to prevent wheel lockup.

  21. What is pipe-filter architecture?

    A data-processing architecture in which data passes through a sequence of filters, each performing a specific operation before passing it onward.

  22. How does modularity benefit pipe-filter architecture?

    Filters can be added or removed to change a workflow, and independent filters can be reused in different pipelines.

  23. Why can debugging a pipe-filter pipeline be difficult?

    An error in the final output may require tracing the data back through multiple filters to find its source.

  24. What data-related constraint must pipe-filter systems account for?

    Filters must agree on the format used to represent and transfer data.

  25. How can a compiler use pipe-filter architecture?

    It can process source code through stages such as lexical analysis, parsing, and code generation.

  26. How can image processing use pipe-filter architecture?

    An image can pass through filters that apply operations such as blurring, sharpening, or color correction.

  27. What is microkernel architecture?

    An architecture with a minimal core that provides essential functionality and plug-in modules that add specialized features.

  28. How do plug-ins extend a microkernel system?

    They add specialized functionality or customizations to the core and can be selected to suit particular needs.

  29. How does microkernel modularity help with updates and maintenance?

    A plug-in can often be updated or fixed without disrupting the core or other parts of the system.

  30. What are challenges of microkernel architecture?

    Communication between the core and plug-ins can become complicated, and a minimal core may require developers to build functionality that other architectures provide out of the box.

  31. How do operating systems illustrate microkernel architecture in the provided example?

    The kernel handles basic tasks such as memory management and process scheduling, while device drivers and other components provide specific functionality as plug-ins.

  32. What is the main trade-off in microkernel architecture?

    It offers flexibility and modularity, but may provide fewer ready-made features and require more implementation work.

  33. What is microservices architecture?

    An architecture that divides an application into small, independent services, each focused on a specific task or function.

  34. How can microservices support development and deployment?

    Teams can work on individual services without necessarily affecting others, which can speed up development and deployment.

  35. How does microservices architecture support scaling?

    A busy service can be scaled independently without scaling the entire system.

  36. What coordination challenges can arise in a microservices system?

    Managing communication and coordination among many independent services can become complex and may contribute to network congestion.

  37. Why is security a significant concern in microservices architecture?

    Each service and the interactions between services must be secured.

  38. How does Netflix illustrate the use of microservices?

    Services such as user authentication and content recommendations can operate as separate services, helping Netflix scale and adapt.

  39. What is space-based architecture?

    A distributed architecture in which multiple processing units work with a shared memory or data space rather than relying on one powerful server.

  40. How does space-based architecture distribute work?

    It spreads workload across multiple nodes that can access shared data and work together.

  41. How can space-based architecture handle increasing workloads?

    Additional nodes can be added to help handle larger amounts of data and traffic.

  42. What challenges must be managed in space-based architecture?

    Distributed systems are complex; data consistency across nodes and communication latency must be managed carefully.

  43. What kinds of applications may use space-based architecture?

    Large e-commerce platforms handling many simultaneous transactions and online games supporting many real-time players.

  44. What is master-slave architecture, also called primary-secondary architecture?

    A system in which a master component coordinates work and delegates tasks to slave, or secondary, components.

  45. What are the respective roles of master and slave components?

    The master makes decisions and assigns tasks; the slave components carry out their assigned work and report back.

  46. How can master-slave architecture support scalability and fault tolerance?

    Workers can be added to handle more work, and the master can reassign a task if a worker becomes unavailable.

  47. Why can the master become a single point of failure, and how can this risk be reduced?

    If the master fails, coordination may stop. A failover mechanism can let a backup master take over.

  48. What performance concern can arise in large master-slave systems?

    Communication between the master and many slaves can become complicated and add performance overhead.

  49. How is master-slave architecture used in database replication?

    Data is copied to multiple servers so the system can switch to a replica if one database server fails, supporting redundancy and availability.

  50. How can master-slave architecture support load balancing?

    The master can distribute incoming traffic across multiple servers to help prevent any one server from becoming overloaded.

  51. What is broker architecture?

    An architecture in which a broker mediates communication by receiving client requests and routing them to appropriate servers.

  52. How does a broker make a system more flexible?

    It decouples clients from servers, allowing servers to be added or removed without directly disrupting the whole system.

  53. How can a broker improve fault tolerance, and what risk remains?

    It can redirect requests when a server fails, but the broker itself can be a single point of failure unless designed with failover mechanisms.

  54. What must be considered when implementing a broker?

    Routing logic, load balancing, security, and failover mechanisms.

  55. Where is broker architecture commonly used?

    It can integrate enterprise applications such as CRM, ERP, and HR systems, or route messages between applications using message brokers such as RabbitMQ or Apache Kafka.

  56. What is Blackboard architecture?

    An architecture in which specialized modules collaborate indirectly by reading and writing information to a central data store called the blackboard.

  57. How do modules contribute to solving a problem in Blackboard architecture?

    Each module adds information, analyzes existing information, or proposes solutions on the shared blackboard.

  58. What kinds of problems suit Blackboard architecture?

    Problems involving uncertain or incomplete data, where a solution emerges gradually through contributions from multiple specialized modules.

  59. How could speech recognition use Blackboard architecture?

    Different modules could analyze audio, identify phonetic units, match words, and interpret meaning while contributing to a central blackboard.

  60. What is a key challenge in Blackboard architecture?

    Managing a shared blackboard so that concurrent contributions stay consistent and synchronized and do not conflict.

  61. What is Interpreter architecture?

    An approach that defines a grammatical representation for a language and provides an interpreter to process and execute instructions written in that language.

  62. How does a programming language interpreter work in the example given?

    It reads human-readable code, such as Python or JavaScript, and translates and executes the instructions, often line by line.

  63. When is Interpreter architecture useful?

    It is useful for creating domain-specific or scripting languages, such as a specialized language for expressing business rules.

  64. What are drawbacks of interpreted languages?

    Executing code line by line can reduce performance compared with compiled languages, and the extra interpretation layer can make debugging harder.

  65. What is the Strategy pattern?

    A pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable.

  66. How could a navigation app use the Strategy pattern?

    It could switch among routing algorithms for the shortest distance, fastest travel time, or avoiding tolls.

  67. How does the Strategy pattern support code reuse and testing?

    Algorithms can be reused in different parts of an application and tested independently.

  68. How does the Strategy pattern make an application more extensible?

    New algorithms can be added without changing existing code, and the system can select an algorithm based on context.

  69. When might the Strategy pattern be unnecessary?

    When there are only one or two simple algorithms, or when the algorithms are so similar that separating them provides little benefit.

  70. What do Model, View, and Controller represent in MVC?

    The Model represents application data and logic; the View displays information to the user; and the Controller handles user input and updates the Model.

  71. How does an online store illustrate MVC?

    The product catalog is the Model, actions such as adding items to a cart are handled by the Controller, and product pages are the View.

  72. What benefits can MVC provide?

    It separates concerns, helps organize web applications, supports code reuse and testing, and can make updates less likely to cause widespread changes.

  73. When might MVC be a poor fit?

    It may become complex in very large applications with many views and controllers, and may add unnecessary overhead to simple applications.

  74. What is the Repository pattern?

    A pattern that mediates between an application's domain logic and its data-access layer, providing an interface for retrieving and persisting data.

  75. How does a repository simplify data access?

    It hides the complexity of the underlying database or data store behind a clean interface.

  76. How can the Repository pattern improve maintainability?

    It loosely couples application components; if the database or data-access logic changes, the repository can be updated without changing the rest of the application.

  77. How can the Repository pattern support testing?

    Its separation of data access from core application logic makes the application easier to test.

  78. When is the Repository pattern most useful?

    It is useful when an application has complex data-access needs and benefits from separating data management from core logic.

  79. What are potential drawbacks of the Repository pattern?

    It may add unnecessary complexity to a simple application, and designing a generic repository that handles many kinds of data-access operations can be challenging.

  80. What project factors should be assessed before choosing an architecture pattern?

    Application size and complexity, performance requirements, security needs, budget limitations, and the team's skills and experience.

  81. Why should a team's experience influence architecture-pattern selection?

    A pattern the team understands is more likely to fit its strengths and be implemented successfully; the newest or fanciest option is not automatically best.

  82. How should a team evaluate a pattern's strengths and weaknesses?

    Compare them with the specific requirements and constraints of the project rather than judging a pattern in isolation.

  83. Which patterns might be considered when scalability and fault tolerance are top priorities?

    Microservices or space-based architecture may be options to consider.

  84. Which patterns might be considered when ease of development and maintenance are priorities?

    Layered architecture or MVC may be options to consider.

  85. How should trade-offs affect the choice of an architecture pattern?

    There is no perfect pattern for every project; choose the compromises that best support the project's goals.

  86. How can the type of data influence architecture-pattern selection?

    Complex data relationships and consistency needs may favor the Repository pattern, while data processed in stages may suit pipe-filter architecture.

  87. Why is it useful to combine or adapt architecture patterns?

    Combining or adapting patterns can create a solution suited to a project's specific challenges and circumstances.

  88. Should architecture patterns be treated as strict rules?

    No. They are guides that provide structure, but developers can apply them creatively and adapt them to the situation.

  89. What qualities should a successful software architecture support?

    The software should be robust, maintainable, and adaptable to users' changing needs.

  90. Why should developers keep learning about architecture patterns?

    Software architecture evolves, and new patterns or changing requirements may call for developers to adapt their approach.

Card 1 of 90
Card 1 of 90

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent