CPSA CPSA Integration and Interfaces Questions and Answers 1 — Questions and Answers
Question 1: In software architecture, what is the primary purpose of defining explicit interfaces between components?
- To decouple components so they can evolve independently without breaking each other (Correct answer)
- To increase the number of classes in the system
- To ensure all components are written in the same programming language
- To make the system easier to test by limiting the number of modules
Correct answer: To decouple components so they can evolve independently without breaking each other
Explicit interfaces create stable contracts between components, enabling independent evolution and reducing coupling.
Question 2: What distinguishes synchronous integration from asynchronous integration between software components?
- Synchronous integration requires the caller to wait for a response, while asynchronous integration allows the caller to continue processing (Correct answer)
- Synchronous integration is always faster than asynchronous integration
- Asynchronous integration requires both systems to be online simultaneously
- Synchronous integration is only used for batch processing systems
Correct answer: Synchronous integration requires the caller to wait for a response, while asynchronous integration allows the caller to continue processing
In synchronous integration the caller blocks until the response arrives; asynchronous integration decouples timing by using messages or callbacks.
Question 3: Which integration style uses a central hub to route messages between multiple systems?
- Message broker / hub-and-spoke integration (Correct answer)
- Point-to-point integration
- Shared database integration
- File transfer integration
Correct answer: Message broker / hub-and-spoke integration
Hub-and-spoke integration centralizes routing logic in a broker, reducing the number of direct connections between systems.
Question 4: What is 'interface bloat' and why is it considered an architectural problem?
- Adding too many methods to an interface, making it harder to implement and increasing coupling (Correct answer)
- Having too few interfaces in a large system
- Using interfaces only in statically typed languages
- Creating interfaces that are too short to be useful
Correct answer: Adding too many methods to an interface, making it harder to implement and increasing coupling
Interface bloat occurs when interfaces grow too large, violating the Interface Segregation Principle and increasing the burden on implementing components.
Question 5: In enterprise integration patterns, what is a 'canonical data model'?
- A shared data format that all integrated systems use to avoid point-to-point format translations (Correct answer)
- The database schema used by the primary application
- A UML class diagram of the domain model
- The XML schema for REST API responses
Correct answer: A shared data format that all integrated systems use to avoid point-to-point format translations
A canonical data model provides a common intermediate format, reducing the number of translators needed from N×(N-1) to 2×N in an N-system landscape.
Question 6: What is the key architectural risk of 'shared database' integration between multiple systems?
- It creates tight coupling at the data layer, making independent evolution and deployment of systems difficult (Correct answer)
- It requires all systems to be written in the same programming language
- It increases network latency for all database queries
- It prevents the use of caching in any of the integrated systems
Correct answer: It creates tight coupling at the data layer, making independent evolution and deployment of systems difficult
Shared database integration tightly couples systems through their data model, meaning a schema change in one system can break all others.
In software architecture, what is the primary purpose of defining explicit interfaces between components?