1/32
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is domain modelling and why is it important?
Domain modelling is the process of visually representing real-world entities, their attributes, and relationships. It helps in understanding and designing the software requirements more clearly by using class diagrams, entity-relationship models, etc.
How to model asynchronous behavior in sequence diagrams?
Use asynchronous messages (open arrowheads) to represent non-blocking calls. For browsing and payment, indicate separate threads or concurrent lifelines to show parallel execution.
How to represent a failure scenario in sequence diagrams?
Add a conditional guard (e.g., [searchFailed]) on a return path. Use alt fragment to depict both success and failure branches in the sequence. X at the lifeline shows object deletion or failure end.
What is software architecture and what are architectural styles?
Software Architecture: The high-level structure of a software system, defining its components and their interactions. Architectural Style: A reusable solution and design pattern for recurring system organization problems (e.g., layered, microservices).
. What’s the difference between architecture and architectural style?
- Architecture = actual system blueprint.
- Style = template or guideline used in designing architectures (e.g., client-server, SOA).
Difference between decomposition and modularity?
- Decomposition: Breaking down a system into smaller parts (e.g., classes, components).
- Modularity: Designing these parts to function independently, promoting maintainability and reusability.
Describe Pipe-and-Filter architecture.
Concept: Data is passed through sequential filters connected by pipes.
Pros:
• Modularity – Filters are independent and easily replaced.
• Reusability – Same filters can be used across different workflows.
• Scalability – Filters can be run in parallel on large datasets.
Cons:
• Latency – Each stage adds delay to data processing.
• Error Handling – Debugging across filters is difficult.
• Bottlenecks – One slow filter affects the whole pipeline.
Best For: Streaming pipelines, compilers, ETL.
Focus: Performance, Scalability.
Blackboard
Concept: A shared central repository (“blackboard”) is updated by independent knowledge sources.
Pros:
• Flexibility – Easy to plug in new components.
• Parallelism – Multiple modules can contribute concurrently.
• Fault Tolerance – System continues even if some modules fail.
Cons:
• Coordination Complexity – Hard to manage module interaction.
• Unpredictability – Execution depends on data availability.
• Overhead – Frequent access to shared data can slow performance.
Best For: AI systems, robotics, decision systems.
Focus: Fault Tolerance, Flexibility.
🔹 Layered
Concept: System split into hierarchical layers: Presentation(handles the UI/user interaction → Business( manages the core application logic) → Persistence( manages access to the database) → Database (actual data storage layer)
Pros:
• Separation of Concerns – Cleanly divides logic.
• Maintainability – Layers can be changed independently.
• Security – Can implement access controls per layer.
Cons:
• Performance Cost – Each request passes through many layers.
• Rigidity – Difficult to bypass layers for optimization.
Best For: Enterprise systems, OS design.
Focus: Maintainability, Security.
SOA (Service-Oriented Architecture)
Concept: Distributed system using services that communicate via standardized protocols (e.g., REST, SOAP).
Pros:
• Reusability – Services can be shared across apps.
• Scalability – Services scale independently.
• Technology Agnostic – Different services can use different tech.
Cons:
• Complexity – Requires orchestration and service discovery.
• Security – Requires strong inter-service protection.
• Latency – Network-based communication adds delay.
Best For: Large distributed systems, legacy modernization.
Focus: Scalability, Security, Flexibility.
🔹 Microservices
Concept: Apps broken into independent services, each owning a specific responsibility.
Pros:
• Scalability – Services scale based on demand.
• Faster Development – Small teams own different services.
• Fault Isolation – Failure in one service doesn’t crash system.
Cons:
• DevOps Burden – Deployment and monitoring of many services.
• Data Consistency – Difficult to maintain across services.
Best For: High-traffic, cloud-native systems.
Focus: Performance, Scalability, Fault Tolerance.
🔹 Event-Based
Concept: Components communicate through publish/subscribe async events.
Pros:
• Loose Coupling – Services don't call each other directly.
• Real-Time – Fast, responsive systems.
• Scalability – Event queues allow high throughput.
Cons:
• Debugging – Hard to trace event flow.
• Out-of-Order Events – Requires handling and retry logic.
• Infrastructure Needs – Needs brokers like Kafka or RabbitMQ.
Best For: Real-time analytics, IoT, notifications.
Focus: Scalability, Performance, Flexibility.
Best Use Cases for Event-Based Architecture
Choosing the Right Architecture for Trade-offs
Choosing the Right Architecture Based on Real-World Needs
Which architecture is best for simple data processing?
Pipe-and-Filter.
Which architecture suits AI and knowledge-based systems?
Blackboard.
What style is ideal for enterprise apps?
Layered or SOA.
What’s best for scalable, resilient systems?
Microservices.
How do Event-Based Architecture and Microservices work together, and why is this combination effective?
How to Combine:
Microservices are designed as small, independently deployable units. Instead of making direct API calls, they use event-based communication by publishing and subscribing to messages—resulting in a highly decoupled system.
Steps to Implement:
Use an event broker (e.g., Kafka, RabbitMQ) to handle message delivery.
Each microservice subscribes to specific events and reacts accordingly.
Services publish events like "Order Created"
or "Payment Processed"
that trigger actions in other services.
Example:
An Order Service publishes an "Order Placed"
event.
Inventory Service listens and updates stock.
Shipping Service listens and begins shipment prep.
Why It’s Effective:
✅ Scalability: Services can be scaled independently.
✅ Resilience: A failure in one service doesn't affect others.
✅ Flexibility: New services can join by simply subscribing to existing events.
How does combining Event-Based Architecture with SOA improve system design?
How to Combine:
SOA normally uses synchronous communication (e.g., REST, SOAP). By integrating event-driven mechanisms, services publish or listen to events, reducing tight coupling.
Steps to Implement:
Services still use standard protocols (SOAP/REST).
Instead of making direct service calls, they publish events (e.g., "User Registered"
).
Other services listen for and respond to these events.
Example:
Customer Service publishes "New Customer Registered"
.
Marketing Service listens and sends a welcome email.
Why It’s Effective:
✅ Flexibility: New services can be added by subscribing to events.
✅ Performance: Reduces latency by avoiding blocking service calls.
How does Event-Based Architecture enhance a Layered Architecture system?
How to Combine:
Instead of tightly synchronized interactions between layers (e.g., UI → Logic → DB), layers send and respond to events asynchronously.
Steps to Implement:
Each layer emits or subscribes to events for processing.
E.g., Presentation → Business Logic → Data Layer via event triggers.
Example:
UI sends "Deposit Made"
event.
Logic Layer processes and validates.
Data Layer asynchronously updates DB.
Why It’s Effective:
✅ Loose Coupling: Layers operate independently.
✅ Scalability: Layers can scale based on event load.
What’s the advantage of implementing Microservices with a Layered Architecture?
How to Combine:
Each microservice internally follows a layered structure (Presentation → Business Logic → Data Access), rather than using one global monolith.
Steps to Implement:
Split business functions into separate microservices.
Each has its own layered internal design.
Example:
User Service with Presentation, Logic, and DB layers.
Payment Service with its own set of internal layers.
Why It’s Effective:
✅ Decoupling: Services evolve independently.
✅ Maintainability: Each can be updated or scaled without affecting others.
How does combining Microservices with SOA improve software architecture?
How to Combine:
SOA is typically monolithic and service-based. Microservices split those services into smaller, independently deployable units.
Steps to Implement:
Break SOA services (e.g., HR, Payments) into microservices.
Use REST APIs or service buses for communication.
Example:
ERP System: HR, Finance, Supply Chain split into separate microservices.
Why It’s Effective:
✅ Flexibility: Smaller parts evolve independently.
✅ Speed: Faster deployment and iteration of each function.
What happens when you combine Event-Based Architecture, Microservices, and SOA?
How to Combine:
Microservices provide independent modules. SOA orchestrates high-level workflows. Event-based messaging binds them together asynchronously.
Steps to Implement:
Microservices publish and consume events (e.g., "Order Placed"
).
SOA layer coordinates the flow using event-based triggers.
Example:
Order Service publishes event.
Inventory Service updates stock.
Payment Service processes the payment, all via events.
Why It’s Effective:
✅ Scalability: Each service scales on its own.
✅ Performance: Async handling improves responsiveness.
✅ Resilience: Failures don’t cascade across the system.
Why combine architectural styles in system design?
Combining styles provides scalability, flexibility, and maintainability by leveraging the strengths of each pattern:
Event-Driven + Microservices → Best for scalability and fault tolerance
Event-Driven + SOA → Enables loose coupling and enterprise flexibility
Microservices + SOA → Combines modular development with enterprise-wide communication
Microservices + Layered → Offers clear structure with scalable, independent services
How does Amazon combine hybrid architectures in its e-commerce platform?
Architectures: Microservices + Event-Driven + SOA
Microservices: Break down into services (auth, order, inventory)
Event-Driven: Publishes events like "Order Placed"
to trigger other services
SOA: Legacy systems (e.g., catalog, payments) use REST/SOAP
Benefits:
✅ Flexibility, ✅ Real-time responsiveness, ✅ Smooth legacy integration
How is hybrid architecture applied in online banking systems like Wells Fargo?
A:
Architectures: Microservices + SOA + Layered
Microservices: Used in new features like mobile apps
SOA: Powers core banking (balances, transfers)
Layered: Backend uses separate presentation, logic, and data layers
Benefits:
✅ High modularity, ✅ Strong compliance, ✅ Clean maintainability
What hybrid architecture powers Netflix’s content delivery?
Architectures: Microservices + Event-Driven + SOA
Microservices: Handle auth, recs, billing
Event-Driven: Events like "Watch History Updated"
trigger recommendations
SOA: Backend systems (e.g., profiles, billing) use SOA for reliability
Benefits:
✅ Real-time personalization, ✅ Performance, ✅ System resilience
How are hybrid architectures used in EHR (Electronic Health Records)?
Architectures: SOA + Event-Driven + Layered
SOA: Manages stable services (patient records, billing)
Event-Driven: Triggers alerts (e.g., "New Test Result"
)
Layered: Internally structured into UI, logic, and data layers
Benefits:
✅ Real-time updates, ✅ Loose coupling, ✅ Scalable health systems
How does Facebook use hybrid architecture to scale social media features?
Architectures: Microservices + Event-Driven + Layered
Microservices: For feed, auth, ads, messaging
Event-Driven: Triggers like "New Post"
update feeds
Layered: Backend separates logic from presentation and storage
Benefits:
✅ Feature independence, ✅ Real-time communication, ✅ Strong maintainability
How do platforms like Walmart or eBay apply hybrid architectures?
Architectures: SOA + Microservices + Event-Driven
SOA: For reliable core services (inventory, orders, payments)
Microservices: Handle search, promotions, recommendations
Event-Driven: "Item Purchased"
or "Stock Updated"
triggers downstream services
Benefits:
✅ Scalability, ✅ Fast innovation, ✅ Real-time inventory and status updates
What are the main benefits of hybrid architectural styles?
🔁 Scalability: Microservices + Event-Driven
🔀 Flexibility: SOA + Microservices
🔧 Maintainability: Layered + Modular components
⚡ Real-Time Processing: Event-Driven async updates
🛠 Best for complex, large-scale systems that mix modern and legacy tech