CPSA Architectural Patterns and Styles 5 — Questions and Answers
Question 1: A system must process large volumes of financial transactions in strict sequential order. Which architectural style is most appropriate?
- Microservices with async messaging
- Pipe-and-Filter with sequential filters (Correct answer)
- Event-Driven Architecture with competing consumers
- Shared-Nothing Architecture with horizontal sharding
Correct answer: Pipe-and-Filter with sequential filters
Pipe-and-Filter enforces strict sequential processing by chaining filters, ensuring each transaction passes through every processing stage in order.
Question 2: Which architectural pattern is best suited for systems that need to support multiple client interfaces (e.g., mobile, web, third-party) each with different data requirements?
- Monolithic Architecture with a single REST API
- Backend for Frontend (BFF) pattern (Correct answer)
- Shared Database Integration
- Pipe-and-Filter Architecture
Correct answer: Backend for Frontend (BFF) pattern
BFF provides a dedicated API layer per client type, allowing each interface to receive data shaped to its specific needs without compromising other clients.
Question 3: In the context of the CPSA framework, which architectural pattern directly supports the 'Open/Closed Principle' by allowing new behavior to be added without modifying the core?
- Active Record Pattern
- Plugin / Microkernel Architecture (Correct answer)
- Shared Database Pattern
- Monolith-First Pattern
Correct answer: Plugin / Microkernel Architecture
Microkernel (Plugin) architecture keeps a minimal stable core and allows new features to be added as plugins, so the core remains closed for modification but open for extension.
Question 4: When evaluating architectural patterns, which ISO 25010 quality attribute does CQRS most directly improve for the read side?
- Maintainability
- Performance efficiency (scalability of reads) (Correct answer)
- Security
- Portability
Correct answer: Performance efficiency (scalability of reads)
CQRS allows the read model to be independently scaled and optimized (e.g., with denormalized read stores) without affecting the write model, directly improving read performance.
Question 5: A team adopts a 'Modular Monolith' instead of microservices. What is the primary architectural benefit of this choice?
- Unlimited horizontal scalability per module
- Strong module boundaries with simpler deployment and operations than distributed services (Correct answer)
- Automatic failover between modules during runtime errors
- Support for polyglot persistence across modules
Correct answer: Strong module boundaries with simpler deployment and operations than distributed services
A modular monolith enforces logical separation through well-defined module interfaces while avoiding the operational overhead of deploying, networking, and monitoring separate services.
Question 6: Which of the following is a key architectural decision criterion when choosing between Choreography and Orchestration for a saga?
- Choreography is always preferred when more than three services are involved
- Orchestration is preferred when visibility into workflow state and centralized error handling are priorities (Correct answer)
- Choreography requires a message broker; orchestration does not
- Orchestration cannot handle compensating transactions
Correct answer: Orchestration is preferred when visibility into workflow state and centralized error handling are priorities
Orchestration centralizes workflow logic and state in one place, making it easier to observe, debug, and handle failures, while choreography distributes that responsibility across services.
Question 7: In software architecture documentation, an Architecture Decision Record (ADR) is used to capture which information?
- Deployment topology and infrastructure cost estimates
- The context, decision made, and consequences of a significant architectural choice (Correct answer)
- API contracts between services in OpenAPI format
- Performance benchmark results for each architectural alternative
Correct answer: The context, decision made, and consequences of a significant architectural choice
An ADR records why an architectural decision was made, what alternatives were considered, and what trade-offs were accepted, preserving institutional knowledge for future maintainers.
A system must process large volumes of financial transactions in strict sequential order.
Which architectural style is most appropriate?